mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-02-23 16:49:59 -05:00
Fix a possible issue wrt. inexistant upload folder
This commit is contained in:
parent
964d3683b5
commit
81ac5c3721
3
main.py
3
main.py
@ -36,6 +36,9 @@ def download_file(filename:str):
|
||||
|
||||
@app.route('/', methods=['GET', 'POST'])
|
||||
def upload_file():
|
||||
if not os.path.exists(app.config['UPLOAD_FOLDER']):
|
||||
os.mkdir(app.config['UPLOAD_FOLDER'])
|
||||
|
||||
mimetypes = set()
|
||||
for parser in parser_factory._get_parsers():
|
||||
mimetypes = mimetypes | parser.mimetypes
|
||||
|
Loading…
x
Reference in New Issue
Block a user