I have a simple model containing a FileField among others. When I use a class based UpdateView It is possible to modify all fields of the model and changes are saved to the database on submit.The only exception to this is the FileField, while it is displayed as part of the form, and I can choose I file I want to upload nothing is saved.
Question: How can I use FileFields in class-based UpdateViews, is there specific code required to handle those fields?
Make sure your form is declared like so:
<form enctype="multipart/form-data" method="post" action="/foo/">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With