Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#13410 closed (worksforme)

imagefield errors if upload is larger than FILE_UPLOAD_MAX_MEMORY_SIZE

Reported by: nickname123 Owned by: nobody
Component: File uploads/storage Version: 1.2-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you use an imagefield and upload an image larger than FILE_UPLOAD_MAX_MEMORY_SIZE (which is smaller than digital camera photos by default) you will get the error: 'TemporaryFile' object has no attribute 'closed'

I guess this is due to the file being streaming to disk instead of read to memory and the ImageField calls the function to get the width and height before the file has been completely uploaded.

I would expect the field to wait until the file is fully uploaded to process the image so that it does not throw errors.

Change History (2)

comment:1 by Russell Keith-Magee, 15 years ago

Resolution: worksforme
Status: newclosed

I can't reproduce this. I've tried uploading large files well in excess of the FILE_UPLOAD_MAX_MEMORY_SIZE and I haven't seen any TemporaryFile error. If you're sure you're seeing this error as a result of a problem in Django, please provide a full set of instructions on how to reproduce the problem; it clearly isn't as simple as "use an ImageField".

comment:2 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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