I want to pass an instance of an object to a HTTP form to be modified, including a file field.
I try with this:
...
form = AnnuncioForm()
form.descrizione.data = annuncio_db['descrizione']
file = open('./images/default.jpg', 'rb')
form.immagine1.data = FileStorage(file)
...
return render_template('modifica_annuncio.html', id=id, form=form)
If i try to print print(form.immagine1.data), it print a FileStorage object but in the site it doesn't appear: