Opened 22 months ago
Last modified 22 months ago
#34582 closed Uncategorized
Uploading multiple files in Django no longer works in version 4.2 but worked in version 4.1 — at Initial Version
Description ¶
In Version 4.1 of Django, I could upload multiple files using the form codes below.
class ResumeUpload(forms.ModelForm):
class Meta:
model = MyModel
fields = [‘resumes’]
widgets = {
‘resumes’: ClearableFileInput(attrs={‘multiple’: True}),
}
But when I upgraded to version 4.2, the code no longer works, I could not select multiple files for upload.
I got a post online that says 'allow_multiple_selected': True, in the code below, should replace ‘multiple’: True as in the code above, but yet it does not work.
widgets = {
'file': forms.ClearableFileInput(attrs={'allow_multiple_selected': True})
}
Please, is there any other means to upload multiple files?
Thanks.
Isaac Bejide;