mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-05-10 10:15:10 -04:00
Fix a possible issue wrt. inexistant upload folder
This commit is contained in:
parent
964d3683b5
commit
81ac5c3721
1 changed files with 3 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue