Opened 13 years ago
Closed 11 years ago
#118 closed enhancement (fixed)
Provide option to limit upload size
Reported by: | joar | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: |
Description (last modified by )
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 (26)
comment:1 by , 13 years ago
Milestone: | → 0.0.4 |
---|
comment:2 by , 13 years ago
Owner: | set to |
---|
comment:3 by , 13 years ago
Owner: | set to |
---|
comment:3 by , 13 years ago
Milestone: | 0.0.4 → 0.0.5 |
---|
We release 0.0.4, so I'm bumping this to 0.0.5.
comment:4 by , 13 years ago
Milestone: | 0.0.5 → 0.1.0 |
---|
comment:5 by , 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 , 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 , 13 years ago
Milestone: | 0.1.0 → 0.2.0 |
---|
comment:8 by , 13 years ago
Milestone: | 0.2.0 → 0.2.1 |
---|
comment:7 by , 13 years ago
The original url for this bug was http://bugs.foocorp.net/issues/408 .
Relations:
#342: blocks
comment:8 by , 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 , 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.
comment:10 by , 12 years ago
Type: | defect → enhancement |
---|
comment:11 by , 12 years ago
Owner: | removed |
---|
I am assuming this isn't being presently coded on so I'm removing ownership, but would be happy to see this one claimed!
comment:12 by , 11 years ago
Status: | accepted → review |
---|
Branched from #89
https://github.com/rodney757/mediagoblin/tree/file_limits
A javascript check on the client side would be a nice addition.
comment:14 by , 11 years ago
I updated the branch with my attempt of a js validation of the file and upload limits. Feel free not to use the js part if it's not correct. First time using the language :)
comment:15 by , 11 years ago
Assuming #89 is good, I think this should be merged with it also.
I like the approach you took... it's very clean!
The branches seem to have diverged in history though since this one was rebased and the other wasn't? I'd recommend making this the canonical one.
comment:16 by , 11 years ago
So I made the changes in your review of #89 and pushed them to this branch. We just need to have the cloud storage tested and I believe it is good to merge.
comment:19 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → accepted |
Wait, I'm a doofus. I merged the one in #89 and not the one in here. I think I was supposed to do the reverse ;)
Anyway, pulling in the commits from this one also.
comment:20 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Okay, now I merged the right branch. That one Just Worked. Whew! Okay, done. :)