#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>