diff options
| author | jvoisin | 2019-03-09 03:54:51 -0800 |
|---|---|---|
| committer | jvoisin | 2019-03-09 03:54:51 -0800 |
| commit | aa55b85c3a6d1fbfe0c4dac549fe0490bbd4d6ca (patch) | |
| tree | a5526a4a96e129528c55385bd2a74b9eb21ece3f | |
| parent | b76dbcd4af6a1d95fa8daa6c6640db92d8be6859 (diff) | |
| parent | 2f2e47f0a260072022ecdb796fc88446c8f4080d (diff) | |
Merge branch 'mention_upload_limit' into 'master'
Mention upload file size limit (Fixe: #15)
See merge request jvoisin/mat2-web!11
Diffstat (limited to '')
| -rw-r--r-- | main.py | 3 | ||||
| -rw-r--r-- | templates/index.html | 3 |
2 files changed, 4 insertions, 2 deletions
| @@ -98,7 +98,8 @@ def upload_file(): | |||
| 98 | 98 | ||
| 99 | return render_template('download.html', mimetypes=mimetypes, meta=meta, filename=output_filename, meta_after=meta_after, key=key) | 99 | return render_template('download.html', mimetypes=mimetypes, meta=meta, filename=output_filename, meta_after=meta_after, key=key) |
| 100 | 100 | ||
| 101 | return render_template('index.html', mimetypes=mimetypes) | 101 | max_file_size = int(app.config['MAX_CONTENT_LENGTH'] / 1024 / 1024) |
| 102 | return render_template('index.html', max_file_size=max_file_size, mimetypes=mimetypes) | ||
| 102 | 103 | ||
| 103 | 104 | ||
| 104 | if __name__ == '__main__': # pragma: no cover | 105 | if __name__ == '__main__': # pragma: no cover |
diff --git a/templates/index.html b/templates/index.html index 576b387..5ae6254 100644 --- a/templates/index.html +++ b/templates/index.html | |||
| @@ -3,7 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | <h2>» Remove metadata</h2> | 4 | <h2>» Remove metadata</h2> |
| 5 | <p> | 5 | <p> |
| 6 | Upload your file, get a <em>cleaned</em> one in response. | 6 | Upload your file (max size: {{ max_file_size }}MB), get a <em>cleaned</em> one in |
| 7 | response. | ||
| 7 | <br><br> | 8 | <br><br> |
| 8 | Please note that while we do not keep a copy of your file,<br> | 9 | Please note that while we do not keep a copy of your file,<br> |
| 9 | there is no way that you could be certain about this: act accordingly. | 10 | there is no way that you could be certain about this: act accordingly. |
