I'm trying to implement an image compression script when an image for a profile is uploaded using WTForms. However, I've had a little trouble understanding how to set it up.
Here's my code:
class Profile(FlaskForm):
photo = FileField('Profile Picture')
submit = SubmitField('Save Changes')
def resize400(inputImg): *image compression code here*
Resize works by itself when I run it, so all I need is a image file input.
Aucun commentaire:
Enregistrer un commentaire