How to append input files instead of replacing when the user picks the files again?
BismeetSingh opened this issue · 4 comments
BismeetSingh commented
I would like to allow the user to make file selection multiple times. I will show the selected file names in a table below and would like to add the newly selected file to the table.
mbraak commented
There is a EditModelFormMultipleView view in the example project that does this.
To see this working in the testproject. The url for creating is: http://localhost:8000/model_form_multiple For editing: http://localhost:8000/model_form_multiple/[id]
This example works with a ModelForm, but it should also be possible with a normal form. The trick is to override get_initial
.
BismeetSingh commented
mbraak commented
BismeetSingh commented
Couldnt figure out how to add multiple files. Solved using dropzone.js . Thanks anyway.