stop trimming sidebars
parent
2cccdce85b
commit
5f18e042aa
|
@ -74,8 +74,7 @@ def submit_art_post(v):
|
||||||
# #to ensure under 2MB
|
# #to ensure under 2MB
|
||||||
temp = f'/asset_submissions/art/{entry.id}-t.webp'
|
temp = f'/asset_submissions/art/{entry.id}-t.webp'
|
||||||
copyfile(highquality, temp)
|
copyfile(highquality, temp)
|
||||||
trim = (entry.kind == 'sidebar')
|
try: process_image(temp, v, resize=entry.resize)
|
||||||
try: process_image(temp, v, resize=entry.resize, trim=trim)
|
|
||||||
except:
|
except:
|
||||||
os.remove(highquality)
|
os.remove(highquality)
|
||||||
abort(413, f"Max size for site assets is {MAX_IMAGE_SIZE_BANNER_RESIZED_MB} MB")
|
abort(413, f"Max size for site assets is {MAX_IMAGE_SIZE_BANNER_RESIZED_MB} MB")
|
||||||
|
@ -140,8 +139,7 @@ def approve_art(v, id):
|
||||||
entry_url = f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{entry.location_kind}/{entry.id}.webp"
|
entry_url = f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{entry.location_kind}/{entry.id}.webp"
|
||||||
|
|
||||||
copyfile(old, filename)
|
copyfile(old, filename)
|
||||||
trim = (entry.kind == 'sidebar')
|
process_image(filename, v, resize=entry.resize)
|
||||||
process_image(filename, v, resize=entry.resize, trim=trim)
|
|
||||||
os.remove(old)
|
os.remove(old)
|
||||||
|
|
||||||
author = request.values.get('author').strip()
|
author = request.values.get('author').strip()
|
||||||
|
|
Loading…
Reference in New Issue