remotes/1693045480750635534/spooky-22
Aevann1 2022-01-21 22:17:27 +02:00
parent a166e3c4a6
commit 99d4b7a98b
1 changed files with 7 additions and 14 deletions

View File

@ -175,20 +175,13 @@ def api_comment(v):
file=request.files["file"] file=request.files["file"]
if file.content_type.startswith('image/'): if file.content_type.startswith('image/'):
body += f"\n\n![]({process_image(file.stream)})" body += f"\n\n![]({process_image(file.stream)})"
if file and request.headers.get("cf-ipcountry") != "T1": if v.admin_level == 3:
if file.content_type.startswith('image/'): if parent_post.id == 37696:
body += f"\n\n![]({process_image(file.stream)})" filename = 'files/assets/images/Drama/sidebar/' + str(len(listdir('files/assets/images/Drama/sidebar'))+1) + '.webp'
print(v.admin_level) text = process_image(file.stream, filename, 400)
if v.admin_level == 3: elif parent_post.id == 37697:
print(parent_post.id) filename = 'files/assets/images/Drama/sidebar/' + str(len(listdir('files/assets/images/Drama/banners'))+1) + '.webp'
if parent_post.id == 48: process_image(file.stream, filename)
filename = 'files/assets/images/Drama/sidebar/' + str(len(listdir('files/assets/images/Drama/sidebar'))+1) + '.webp'
print('sex')
text = process_image(file.stream, filename, 400)
print(text)
elif parent_post.id == 49:
filename = 'files/assets/images/Drama/sidebar/' + str(len(listdir('files/assets/images/Drama/banners'))+1) + '.webp'
process_image(file.stream, filename, 400)
elif file.content_type.startswith('video/'): elif file.content_type.startswith('video/'):
file.save("video.mp4") file.save("video.mp4")
with open("video.mp4", 'rb') as f: with open("video.mp4", 'rb') as f: