mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-05-12 11:12:17 -04:00
Api/bulk download for frontend
This commit is contained in:
parent
c96d3b8178
commit
70978f7db2
6 changed files with 334 additions and 28 deletions
13
utils.py
13
utils.py
|
@ -19,4 +19,15 @@ def hash_file(filepath: str) -> str:
|
|||
|
||||
def check_upload_folder(upload_folder):
|
||||
if not os.path.exists(upload_folder):
|
||||
os.mkdir(upload_folder)
|
||||
os.mkdir(upload_folder)
|
||||
|
||||
|
||||
def return_file_created_response(output_filename, mime, key, meta, meta_after, download_link):
|
||||
return {
|
||||
'output_filename': output_filename,
|
||||
'mime': mime,
|
||||
'key': key,
|
||||
'meta': meta,
|
||||
'meta_after': meta_after,
|
||||
'download_link': download_link
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue