mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-05-12 19:22:21 -04:00
documented download endpoint
This commit is contained in:
parent
6aa9fa7029
commit
2c1bc2f05a
2 changed files with 34 additions and 0 deletions
|
@ -72,6 +72,7 @@ class APIDownload(Resource):
|
|||
def __init__(self, **kwargs):
|
||||
self.upload_folder = kwargs['upload_folder']
|
||||
|
||||
@swag_from('./oas/download.yml')
|
||||
def get(self, key: str, secret: str, filename: str):
|
||||
complete_path, filepath = utils.is_valid_api_download_file(filename, key, secret, self.upload_folder)
|
||||
# Make sure the file is NOT deleted on HEAD requests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue