upload path
This commit is contained in:
parent
4c942b35d0
commit
d9191b17af
1 changed files with 2 additions and 2 deletions
4
app.py
4
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
|
||||
|
|
Reference in a new issue