[Django] #34794: Multiple file upload issue

15 views
Skip to first unread message

Django

unread,
Aug 23, 2023, 6:43:24 AM8/23/23
to django-...@googlegroups.com
#34794: Multiple file upload issue
------------------------------------------------+------------------------
Reporter: Waseem Kntar | Owner: nobody
Type: Bug | Status: new
Component: File uploads/storage | Version: 4.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Hello,

I need a multiple file field in a form, so that I saw this section in
django docs

https://docs.djangoproject.com/en/4.2/topics/http/file-uploads/#uploading-
multiple-files

And the file field is accepting a multiple file now.

The problem appear when I try to get those files by `request.FILES` in the
post method, it shows the following (a screenshot):

https://drive.google.com/file/d/1BIgd9mcQIZGf_pUzK4u-
BPR56cVnKKEE/view?usp=sharing

To solve this, I just cast request.FILES into a dict, after this I managed
to access the attachments list.

But why that happens in the MultiValueDict ?

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

Django

unread,
Aug 23, 2023, 6:44:15 AM8/23/23
to django-...@googlegroups.com
#34794: Multiple file upload issue
-------------------------------------+-------------------------------------
Reporter: mo-waseem | Owner: nobody
Type: Bug | Status: new
Component: File | Version: 4.0
uploads/storage |
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by mo-waseem):

* Attachment "Screenshot from 2023-08-23 11-14-20.png" added.

Django

unread,
Aug 23, 2023, 6:55:45 AM8/23/23
to django-...@googlegroups.com
#34794: Multiple file upload issue
-------------------------------------+-------------------------------------
Reporter: Waseem Kntar | Owner: nobody
Type: Bug | Status: closed

Component: File | Version: 4.0
uploads/storage |
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

Thanks for the ticket, however, this is a support question and Trac is not
a support channel. Also, you seem to be using Django 4.0 and docs for
Django 4.2. If you're having trouble understanding how Django works, see
TicketClosingReasons/UseSupportChannels for ways to get help.

--
Ticket URL: <https://code.djangoproject.com/ticket/34794#comment:1>

Reply all
Reply to author
Forward
0 new messages