I want to upload and save multiple files in my application, I have
<input type="text" name="name" value="" />
<input type="file" name="file" multiple/>
in my template. when I hit upload, seems
form = MyForm(request.POST, request.FILES)
is only saving one file which is last in the list of the many uloaded files. How can I be able to save all the uploaded files using the form form = MyForm(request.POST, request.FILES) blah blah
? Thanks
Edit
Myform
is a model form from this model.
class Docs(models.Model):
name = models.CharField(max_length=128)
file = models.FileField(max_length=100, upload_to="documents/")