fix the resolution restriction applying for sidebar

pull/225/head
Aevann 2024-03-09 16:48:09 +02:00
parent f9c8042cf4
commit 0cb4c7aeb4
1 changed files with 5 additions and 4 deletions

View File

@ -63,10 +63,11 @@ def submit_art_post(v):
file.save(highquality)
process_image(highquality, v) #to ensure not malware
with Image.open(highquality) as i:
if i.width != 2000 or i.height != 200:
os.remove(highquality)
abort(400, "Banners must be 2000x200")
if kind == "banner":
with Image.open(highquality) as i:
if i.width != 2000 or i.height != 200:
os.remove(highquality)
abort(400, "Banners must be 2000x200")
path = f"files/assets/images/{SITE_NAME}/{entry.location_kind}"
if not entry.hashes: