#29510: QueryDict.copy() returns closed files when the type of file is
TemporaryUploadedFile
-------------------------------------+-------------------------------------
     Reporter:  Liquid Scorpio       |                    Owner:  Dan
                                     |  Madere
         Type:  Bug                  |                   Status:  assigned
    Component:  File                 |                  Version:  1.11
  uploads/storage                    |
     Severity:  Normal               |               Resolution:
     Keywords:  QueryDict, upload,   |             Triage Stage:  Accepted
  file                               |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

 Presumably you're using [https://www.django-rest-framework.org/api-
 guide/requests/#data DRF's request.data] which "includes all parsed
 content, including file and non-file inputs."

 `request.POST` is still available there that gives you the QueryDict
 without the file data.

 (Still looking at how I'm able to copy the `TemporaryUploadedFile` in the
 test case.)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29510#comment:19>
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/01070185c9c8f86c-bee66974-a8da-40cc-8f5c-bb4ee6faf09c-000000%40eu-central-1.amazonses.com.

Reply via email to