Enhance FileField form field with "delete" checkbox when file is loaded
|Reported by:||Valera_Grishin||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently Django displays the FileField and ImageField with file upload HTML widget only. This allows for uploading the new file or image and overwritting already stored file or image with a newer version. But it doesn't give you an option to delete the uploaded file or image. To overcome this problem one must provide a separate CheckboxInput and handle its logic in a view specifically to delete the file.
So, the point is to enhance the FileField and ImageField widgets with checkbox which appear in HTML only when file or image is already loaded. The proposed label for checkbox is "Delete". When checkbox is ticked and new file is not provided the correspoding file (or image) must be deleted on server.
Change History (8)
comment:6 follow-up: 8 Changed 8 years ago by
|Status:||closed → reopened|