Opened 18 years ago

Closed 16 years ago

#1882 closed enhancement (duplicate)

limit upload file size

Reported by: mdt@… Owned by: Philippe Raoult
Component: Core (Other) Version:
Severity: minor Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

would be nice if the filesize of uploaded files to ImageField and FileField could be limited.

Change History (12)

comment:1 by Chris Beaven, 18 years ago

Triage Stage: UnreviewedDesign decision needed

I'm sure you could do this yourself if you are that worried, not sure this needs to be in the core.

But I'll let a core developer decide.

comment:2 by m. dietrich <mdt@…>, 18 years ago

i don't think, this would help. i would prefere to see such functionality on http-level. here you could even drop the connection when the file-size is too large before receiving all the stuff.

in reply to:  2 comment:3 by Simon G. <dev@…>, 18 years ago

This is usually handled by the webserver (e.g. Apache's LimitRequestBody directive), would trying to manage this in Django be overkill?

comment:4 by m. dietrich <mdt@…>, 18 years ago

django could do it at a finer granularity while apache's settings are more or less global...

comment:6 by Philippe Raoult, 17 years ago

Owner: changed from nobody to Philippe Raoult
Status: newassigned

will be solved by #5361.

comment:7 by James Bennett, 17 years ago

Resolution: duplicate
Status: assignedclosed

Closing in favor of #5361.

comment:8 by Marty Alchin, 17 years ago

Keywords: fs-rf added

comment:9 by Marty Alchin, 16 years ago

Keywords: fs-rf removed

For the archives: I'm not sure this is entirely related to #5361, but if nothing else, the fix for #2070 would certainly enable this behavior. Removing fs-rf.

comment:10 by gson@…, 16 years ago

Resolution: duplicate
Status: closedreopened

As far as I can tell, Django still doesn't actually have a way of limiting the sizes of uploaded files, and neither #5361 nor #2070 is really a duplicate.

comment:11 by Karen Tracey, 16 years ago

With #2070 in place now, though, it would seem trivially easy (admittedly said by one who hasn't actually done it) to write an upload handler that limits file upload size. So the question becomes is it worth having that as one of the provided upload handlers? You might want to raise that question on the dev list.

comment:12 by Brian Rosner, 16 years ago

Resolution: duplicate
Status: reopenedclosed

The original intention of this ticket has been solved by #2070. It is entirely possible to limit the uploaded file to a specific size. See http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/file_uploads/uploadhandler.py#L7. New issues/enhancements should be raised in new tickets. Resetting original closed state, but more in favor of #2070 being the ticket this is a duplicate of :)

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