After a lot of digging I've found the root of my problem. I had invalid
ownership set on FILE_UPLOAD_TEMP_DIR.
Once the file exceeded FILE_UPLOAD_MAX_MEMORY_SIZE and was deemed as
TemporaryUploadedFile, something happened, and I received an empty
request.
This could be solved much sooner, if an Exception was raised.
This happened in production environment with Apache and WSGI.
--
Ticket URL: <https://code.djangoproject.com/ticket/33395>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => duplicate
* component: File uploads/storage => Core (Other)
* type: Uncategorized => Bug
Comment:
Thanks for the report. It should be fixed in Django 4.0, see #32329,
#32360, and related commits 00ea883ef56fb5e092cbe4a6f7ff2e7470886ac4 and
b1821fbad5518c8ae56b7b5c2b1ea2afbbd25c7a.
--
Ticket URL: <https://code.djangoproject.com/ticket/33395#comment:1>