Opened 18 years ago
Closed 16 years ago
#1882 closed enhancement (duplicate)
limit upload file size
Reported by: | 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 , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
follow-up: 3 comment:2 by , 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.
comment:3 by , 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 , 18 years ago
django could do it at a finer granularity while apache's settings are more or less global...
comment:7 by , 17 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Closing in favor of #5361.
comment:8 by , 17 years ago
Keywords: | fs-rf added |
---|
comment:9 by , 16 years ago
Keywords: | fs-rf removed |
---|
comment:10 by , 16 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:11 by , 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 , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
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 :)
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.