#35534: Request attribute upload handlers is immutable when method is POST
-------------------------------+--------------------------------------
     Reporter:  matsony_15     |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  Generic views  |                  Version:  5.0
     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
-------------------------------+--------------------------------------
Comment (by Sarah Boyce):

 This feels like a duplicate of #26049

 In the docs there is a [https://docs.djangoproject.com/en/5.0/topics/http
 /file-uploads/#modifying-upload-handlers-on-the-fly note]
 > You can only modify upload handlers before accessing request.POST or
 request.FILES – it doesn’t make sense to change upload handlers after
 upload handling has already started. If you try to modify
 request.upload_handlers after reading from request.POST or request.FILES
 Django will throw an error.

 I suspect the issue is that you're accessing `request.POST` in the init of
 `ProgressBarUploadHandler`

 If you want to discuss this further, I recommend taking this to the
 [https://forum.djangoproject.com/c/users/6 forum] 👍
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35534#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/010701902fd0baee-284bbfcd-4551-482e-8f7b-31fcf7abae3d-000000%40eu-central-1.amazonses.com.

Reply via email to