Opened 13 years ago

Last modified 11 years ago

#118 closed enhancement

Provide option to limit upload size — at Version 9

Reported by: joar Owned by: Chris Moylan
Priority: minor Milestone:
Component: programming Keywords:
Cc: Parent Tickets:

Description (last modified by Christopher Allan Webber)

Due to the possibility to overload a server by sending it HUGE POST
requests, we should provide an option to instance-owners to limit
the possible media upload size.

Presumably, we should put this option in ``mediagoblin.ini``.

We should also display this information to the end-user by
providing a notice in ``mediagoblin/submit/forms.py``.

Here's a handy snippet provided by cwebber/paroneayea that might
aid anyone pursuing this ticket's completion:
`http://wiki.pylonshq.com/display/pylonscookbook/A+Better+Way+To+Limit+File+Upload+Size <http://wiki.pylonshq.com/display/pylonscookbook/A+Better+Way+To+Limit+File+Upload+Size>`_



Change History (15)

comment:1 by joar, 13 years ago

Milestone: 0.0.4

comment:2 by joar, 13 years ago

Owner: set to Joar Wandborg

comment:3 by joar, 13 years ago

Owner: set to Joar Wandborg

comment:1 by Christopher Allan Webber, 13 years ago

Owner: set to Chris Moylan
Assigning to Chris Moylan!



comment:2 by Christopher Allan Webber, 13 years ago

Ping me on IRC if you have questions.



comment:3 by Will Kahn-Greene, 13 years ago

Milestone: 0.0.40.0.5
We release 0.0.4, so I'm bumping this to 0.0.5.



comment:4 by Christopher Allan Webber, 13 years ago

Milestone: 0.0.50.1.0

comment:4 by Christopher Allan Webber, 13 years ago

Hey Chris,

Still interested in working on this?



comment:5 by Chris Moylan, 13 years ago

Yes, I am still interested. I'm guessing this check can go right in
submit\_start in submit/views.py?



comment:6 by Christopher Allan Webber, 13 years ago

Totally lame for not responding... sorry, I was sent on a work trip
that threw me way off on my ability to reply to mediagoblin bugs.
But now I'm back, and for quite a while!

And the answer to your question is "yes, that sounds right, worst
comes to worst we'll shuffle things around after looking at it."



comment:7 by Christopher Allan Webber, 13 years ago

Milestone: 0.1.00.2.0

comment:8 by Elrond, 13 years ago

Milestone: 0.2.00.2.1

comment:7 by Will Kahn-Greene, 13 years ago

The original url for this bug was http://bugs.foocorp.net/issues/408 .
Relations:
#342: blocks

comment:8 by Christopher Allan Webber, 13 years ago

Hm hm.

So the current way we "handle" this is in the docs we tell people how to adjust the nginx file limit. That's fine for one-at-a-time submissions enough for now (though it doesn't give anything remotely near a useful error message once that limit is hit).

So I guess there are three things to consider still:

  • Is file uploading limits via apache/nginx way we're doing it currently enough?
  • Even if it is, it doesn't provide an error page if things go badly. Is there a way to handle that, at least with javascript? (I guess this ties into whether or not we're going to build a more ajaxy submission page)
  • Cumulative uploads: I'm actually much more interested in this at the moment, and if someone wants to take it on, it would be great. It would be good if we could set "upload limits" to say "X user is currently limited to 5GB of uploads" or whatever. Maybe that deserves a new ticket though. It also might be something that should wait till we have a plugin architecture.

comment:9 by Christopher Allan Webber, 13 years ago

Description: modified (diff)
Milestone: 0.2.1

I doubt we can get this done for 0.2.2 so I've taken it off that milestone.

Note: See TracTickets for help on using tickets.