Skip to content

Commit 9efa4cc

Browse files
committed
actually fix image upload
1 parent fca9a61 commit 9efa4cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ def uploadImageResize(file, access_point_id, count, is_thumbnail=False):
13351335

13361336
with PilImage.open(file_obj) as im:
13371337
exif = im.getexif()
1338-
im = limit_height(im, app.config["MAX_IMG_HEIGHT"])
1338+
im = limit_height(im, int(app.config["MAX_IMG_HEIGHT"]))
13391339
exif = scrubGPSFromExif(exif)
13401340
exif[ExifBase.ImageWidth.value] = im.width
13411341
exif[ExifBase.ImageLength.value] = im.height

config.env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
BUCKET_NAME = os.getenv("BUCKET_NAME", default="tunnelvision")
1515
ITEMSPERPAGE = 18
1616

17-
MAX_IMG_HEIGHT = int(os.getenv("MAX_IMG_HEIGHT", default="2048"))
17+
MAX_IMG_HEIGHT = os.getenv("MAX_IMG_HEIGHT", default="2048")
1818

1919
WEBHOOK_CREDENTIAL = os.getenv("WEBHOOK_CREDENTIAL", default="")
2020

0 commit comments

Comments
 (0)