Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 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: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

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 bigfile.py that when executed creates a zero-filled bigfile.dat file. Run manage.py syncdb and manage.py 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 6 years ago.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by snaury

comment:1 Changed 6 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

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 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.