Opened 10 years ago

Closed 7 years ago

#1882 closed enhancement (duplicate)

limit upload file size

Reported by: mdt@… Owned by: PhiR
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 9 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Design 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 follow-up: Changed 9 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 9 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 9 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 PhiR

  • Owner changed from nobody to PhiR
  • Status changed from new to assigned

will be solved by #5361.

comment:7 Changed 9 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from assigned to closed

Closing in favor of #5361.

comment:8 Changed 9 years ago by Gulopine

  • Keywords fs-rf added

comment:9 Changed 8 years ago by Gulopine

  • 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 deleted
  • Status changed from closed to reopened

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 kmtracey

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 7 years ago by brosner

  • Resolution set to duplicate
  • Status changed from reopened to 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 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