plugin_web_path = string(default="/plugin_static/")
plugin_linked_assets_dir = string(default="%(here)s/user_dev/plugin_static/")
-# User upload limit (in Mb)
-upload_limit = integer(default=500)
+# Default user upload limit (in Mb)
+#upload_limit = integer(default=500)
[jinja2]
# Jinja2 supports more directives than the minimum required by mediagoblin.
if user.upload_limit >= 0:
upload_limit = user.upload_limit
else:
- upload_limit = mg_globals.app_config['upload_limit']
+ upload_limit = mg_globals.app_config.get('upload_limit', None)
- if user.uploaded >= upload_limit:
+ if upload_limit and user.uploaded >= upload_limit:
messages.add_message(
request,
messages.WARNING,
file_size = float('{0:.2f}'.format(file_size))
# Check if user is over upload limit
- if (user.uploaded + file_size) >= upload_limit:
+ if upload_limit and (user.uploaded + file_size) >= upload_limit:
messages.add_message(
request,
messages.WARNING,