aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/addmedia.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-11-14 11:09:18 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-11-14 11:09:18 -0600
commit210a6cebe010786bd52dae6c58cb20fa76a2bc4f (patch)
tree4876d492d3d6d865cf715c071985f4acf9fcbb85 /mediagoblin/gmg_commands/addmedia.py
parent860b380bb5ccfb3f752f13d79fd43c6bd7fb428b (diff)
downloadmediagoblin-210a6cebe010786bd52dae6c58cb20fa76a2bc4f.tar.lz
mediagoblin-210a6cebe010786bd52dae6c58cb20fa76a2bc4f.tar.xz
mediagoblin-210a6cebe010786bd52dae6c58cb20fa76a2bc4f.zip
Switching the addmedia tool over to using the get_upload_file_limits tool also.
This commit sponsored by Damien Radtke. Thanks!
Diffstat (limited to 'mediagoblin/gmg_commands/addmedia.py')
-rw-r--r--mediagoblin/gmg_commands/addmedia.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/mediagoblin/gmg_commands/addmedia.py b/mediagoblin/gmg_commands/addmedia.py
index 263df079..c33a8c56 100644
--- a/mediagoblin/gmg_commands/addmedia.py
+++ b/mediagoblin/gmg_commands/addmedia.py
@@ -18,7 +18,7 @@ import os
from mediagoblin.gmg_commands import util as commands_util
from mediagoblin.submit.lib import (
- submit_media,
+ submit_media, get_upload_file_limits,
FileUploadLimit, UserUploadLimit, UserPastUploadLimit)
from mediagoblin import mg_globals
@@ -78,12 +78,7 @@ def addmedia(args):
print "Can't find a file with filename '%s'" % args.filename
return
- if user.upload_limit >= 0:
- upload_limit = user.upload_limit
- else:
- upload_limit = mg_globals.app_config.get('upload_limit', None)
-
- max_file_size = mg_globals.app_config.get('max_file_size', None)
+ upload_limit, max_file_size = get_upload_file_limits(user)
def maybe_unicodeify(some_string):
# this is kinda terrible