summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico von Geyso <Nico.Geyso@FU-Berlin.de>2012-05-21 13:09:15 +0200
committerNico von Geyso <Nico.Geyso@FU-Berlin.de>2012-05-21 13:09:15 +0200
commit69d42de7ea76db5d166b7a112a13de61c27528a2 (patch)
treed0b2beff67d56c8c32a493638fa00cf0530548cc
parent9f5d3eb02c6af92d386bfbf36b8bc56bc1d3f7a9 (diff)
downloadklausuren-69d42de7ea76db5d166b7a112a13de61c27528a2.tar.gz
klausuren-69d42de7ea76db5d166b7a112a13de61c27528a2.tar.bz2
klausuren-69d42de7ea76db5d166b7a112a13de61c27528a2.zip
set file upload limit to 10mb
-rw-r--r--app.py4
-rw-r--r--settings.py3
-rw-r--r--static/upload.js2
3 files changed, 6 insertions, 3 deletions
diff --git a/app.py b/app.py
index 6b96cae..114da0c 100644
--- a/app.py
+++ b/app.py
@@ -8,7 +8,7 @@ from werkzeug import secure_filename
fit = Fit('static/fit.git')
app = Flask(__name__)
-app.secret_key = 'naidiequ8zies1weed4we6iexood1Bae'
+app.config.from_object('settings')
ALLOWED_EXTENSIONS = set(
['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'zip', 'gs', 'gz' ])
@@ -89,4 +89,4 @@ def index():
if __name__ == "__main__":
- app.run(debug=True)
+ app.run()
diff --git a/settings.py b/settings.py
new file mode 100644
index 0000000..6c91281
--- /dev/null
+++ b/settings.py
@@ -0,0 +1,3 @@
+SECRET_KEY = 'secret_key_to_fill_in'
+MAX_CONTENT_LENGTH = 10 * 1024 * 1024
+DEBUG = False
diff --git a/static/upload.js b/static/upload.js
index 3a6d0ca..48f5581 100644
--- a/static/upload.js
+++ b/static/upload.js
@@ -46,7 +46,7 @@ fileUploader.init = function() {
'<label for="">' +
file.name + ' (' + plupload.formatSize(file.size) + ')' +
'</label>' +
- '<input type="text" placeholder="Tag" name="'+file.id+'" />' +
+ '<input type="text" placeholder="Tags (comma-separated)" name="'+file.id+'" />' +
'<b></b>' +
'</li>');
});