#34582: Uploading multiple files in Django no longer works in version 4.2 but
worked in version 4.1
-------------------------------------+-------------------------------------
     Reporter:  Bejide, Isaac        |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  closed
    Component:  File                 |                  Version:  4.2
  uploads/storage                    |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
  'allow_multiple_selected': True    |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => invalid
 * component:  Uncategorized => File uploads/storage


Old 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;

New 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;

--

Comment:

 Your code `attrs={'allow_multiple_selected': True}` isn't correct. Please
 read https://docs.djangoproject.com/en/stable/topics/http/file-uploads
 /#uploading-multiple-files or see TicketClosingReasons/UseSupportChannels
 to get help. This ticket tracker isn't a support channel for asking
 questions.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34582#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701883aa7cd4a-045f6482-a299-4e40-8032-4039382f4617-000000%40eu-central-1.amazonses.com.

Reply via email to