forked from rDrama/rDrama
fdfd
parent
fe5b225fff
commit
6404f3c13e
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue