Opened 3 years ago

Closed 3 years ago

#33395 closed Bug (duplicate)

No error raised when FILE_UPLOAD_TEMP_DIR is not accessible

Reported by: Martin Koščak Owned by: nobody
Component: Core (Other) Version: 3.2
Severity: Normal Keywords: empty request large file upload
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This one took me a while to figure out, so I'm creating a ticket.
The initial issue I had was, when I uploaded a larger file (+10MB), I received no data in request. The POST, GET and FILES attributes of request were all empty, only META attribute was OK.

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.

Change History (1)

comment:1 by Mariusz Felisiak, 3 years ago

Component: File uploads/storageCore (Other)
Resolution: duplicate
Status: newclosed
Type: UncategorizedBug

Thanks for the report. It should be fixed in Django 4.0, see #32329, #32360, and related commits 00ea883ef56fb5e092cbe4a6f7ff2e7470886ac4 and b1821fbad5518c8ae56b7b5c2b1ea2afbbd25c7a.

Note: See TracTickets for help on using tickets.
Back to Top