dfsf
This commit is contained in:
parent
7f79cc75e3
commit
3d8c4e474c
1 changed files with 14 additions and 10 deletions
|
@ -175,6 +175,20 @@ 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})"
|
body += f"\n\n})"
|
||||||
|
if file and request.headers.get("cf-ipcountry") != "T1":
|
||||||
|
if file.content_type.startswith('image/'):
|
||||||
|
body += f"\n\n})"
|
||||||
|
print(v.admin_level)
|
||||||
|
if v.admin_level == 3:
|
||||||
|
print(parent_post.id)
|
||||||
|
if parent_post.id == 48:
|
||||||
|
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:
|
||||||
|
@ -633,16 +647,6 @@ def edit_comment(cid, 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})"
|
body += f"\n\n})"
|
||||||
if v.admin_level == 3:
|
|
||||||
if parent_post.id == 48:
|
|
||||||
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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue