diff options
| author | jvoisin | 2018-12-16 21:47:25 +0100 |
|---|---|---|
| committer | jvoisin | 2018-12-16 21:47:25 +0100 |
| commit | d07b313e8959a514797f9f2d249d6cbf00a27573 (patch) | |
| tree | c76e54642953c3563c556fa8a8af8099daed7165 /main.py | |
| parent | 5ce3db7e82b47ca3865f3909582309e9a0b44e2e (diff) | |
Supported types are now directly provided by mat2
Diffstat (limited to '')
| -rw-r--r-- | main.py | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -36,6 +36,11 @@ def download_file(filename:str): | |||
| 36 | 36 | ||
| 37 | @app.route('/', methods=['GET', 'POST']) | 37 | @app.route('/', methods=['GET', 'POST']) |
| 38 | def upload_file(): | 38 | def upload_file(): |
| 39 | mimetypes = set() | ||
| 40 | for parser in parser_factory._get_parsers(): | ||
| 41 | mimetypes = mimetypes | parser.mimetypes | ||
| 42 | mimetypes = ', '.join(mimetypes) | ||
| 43 | |||
| 39 | if request.method == 'POST': | 44 | if request.method == 'POST': |
| 40 | if 'file' not in request.files: # check if the post request has the file part | 45 | if 'file' not in request.files: # check if the post request has the file part |
| 41 | flash('No file part') | 46 | flash('No file part') |
