From d9191b17af4b486082d58f894e528c729b2ec81a Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Thu, 13 Apr 2023 12:01:05 +0200 Subject: [PATCH] upload path --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index f94514a..97c0823 100644 --- a/app.py +++ b/app.py @@ -4,7 +4,7 @@ import uuid from flask import Flask, request, jsonify, send_from_directory app = Flask(__name__) -app.config['UPLOAD_FOLDER'] = os.environ.get('UPLOAD_FOLDER', './uploads') +app.config['UPLOAD_FOLDER'] = os.environ.get('UPLOAD_FOLDER', '/uploads') app.config['MAX_CONTENT_LENGTH'] = int(os.environ.get('MAX_CONTENT_LENGTH', '5')) * 1024 * 1024 # in MB VALID_FILENAME_REGEX = r'^[a-zA-Z0-9\-_\.]+$' @@ -50,7 +50,7 @@ if __name__ == '__main__': # Upload -# curl -X POST -H "Authorization: Bearer myuploadtoken" -F "file=@/path/to/file" http://docker10.grote.lan:5040/upload +# curl -X POST -H "token: myuploadtoken" -F "file=@/path/to/file" http://docker10.grote.lan:5040/upload # Download # curl -X GET http://docker10.grote.lan:5040/download/filename.ext > filename.ext # List