Opened 10 years ago

Closed 8 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: UI/UX:


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

Change History (12)

comment:1 Changed 10 years ago by Chris Beaven

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 Changed 10 years ago by m. dietrich <mdt@…>

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 in reply to:  2 Changed 10 years ago by Simon G. <dev@…>

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

comment:4 Changed 10 years ago by m. dietrich <mdt@…>

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

comment:6 Changed 9 years ago by Philippe Raoult

Owner: changed from nobody to Philippe Raoult
Status: newassigned

will be solved by #5361.

comment:7 Changed 9 years ago by James Bennett

Resolution: duplicate
Status: assignedclosed

Closing in favor of #5361.

comment:8 Changed 9 years ago by Marty Alchin

Keywords: fs-rf added

comment:9 Changed 8 years ago by Marty Alchin

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 Changed 8 years ago by gson@…

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 Changed 8 years ago by Karen Tracey

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 Changed 8 years ago by Brian Rosner

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 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