Django TemporaryUploadedFile not rendered if form is invalid

I have a form that contains FileField as one of its fields. Each field in the form is rendered using as_crispy_field.


If I entered all the inputs (including the file), and the form got re-rendered because it is invalid, it shows the same values of all inputs except the file input value. However, I can see the TemporaryUploadedFile value using {{ form.my_file.value }}

Back to Top