mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-06-29 00:27:24 -04:00
Resolve "Fuzzing Errors /api/upload"
This commit is contained in:
parent
9157dee69f
commit
853ace7d83
5 changed files with 46 additions and 5 deletions
|
@ -65,6 +65,8 @@ def get_supported_extensions():
|
|||
|
||||
def save_file(file, upload_folder):
|
||||
filename = secure_filename(file.filename)
|
||||
if not filename:
|
||||
raise ValueError('Invalid Filename')
|
||||
filepath = os.path.join(upload_folder, filename)
|
||||
file.save(os.path.join(filepath))
|
||||
return filename, filepath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue