Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#8450 closed (duplicate)

Admin interface fills the harddrive on uploading files of roughly 2.5MBs in size

Reported by: snaury Owned by: nobody
Component: contrib.admin Version: dev
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


When using admin interface on a model that has FileField and trying to upload files of roughly 2.5MBs django gets into a loop (I've checked on Windows XP SP2 only for now), saving the file over and over again (adding underscore on every iteration), never stopping. I haven't been able to determine the exact file size though, but 2.5MBs seems to work in all cases. Unfortunately I don't know django well enough to determine if this problem exists outside of admin interface. I can't find where exactly it is looping like that either (if you can hint me of some way it would be greatly appreciated). :(

I'm attaching a sample project that reproduces the problem. Inside you will find a that when executed creates a zero-filled bigfile.dat file. Run syncdb and runserver then navigate to http://localhost:8000/admin/main/myfile/add/ and try attaching bigfile.dat. On my machine it starts filling myfile subdirectory with multitudes of bigfile.dat copies. All of the files saved there are identical to bigfile.dat, so it must be saving it correctly, but then it aborts and tries saving it again. If the file is, for example, 1KB smaller then everything goes fine.

I'm testing using trunk revision 8448.

Attachments (1)

myproject.tar.bz2 (2.4 KB) - added by snaury 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by snaury

Attachment: myproject.tar.bz2 added

comment:1 Changed 14 years ago by Karen Tracey

Resolution: duplicate
Status: newclosed

I think this is caused by #8203, which has a patch you could try to verify that it fixes the problem you're seeing.

comment:2 Changed 11 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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