remotes/1693045480750635534/spooky-22
Aevann1 2021-07-29 10:18:14 +02:00
parent fe5b225fff
commit 6404f3c13e
2 changed files with 5 additions and 4 deletions

View File

@ -31,9 +31,10 @@ def crop_and_resize(img, resize):
def upload_file(file, resize=None):
if resize:
filename = "image"
filename = "image.png"
remove(filename)
file.save(filename)
i = IImage.open(filename)
i = crop_and_resize(i, resize)

View File

@ -328,10 +328,10 @@ def settings_images_profile(v):
g.db.rollback()
abort(413)
highres = upload_file(request.files["profile"])
imageurl = upload_file(request.files["profile"], (100, 100))
if imageurl:
v.highres = highres
highres = upload_file(request.files["profile"])
if highres: v.highres = highres
v.profileurl = imageurl
g.db.add(v)