same
This commit is contained in:
parent
a754277c04
commit
bd39977741
2 changed files with 1 additions and 8 deletions
8
app.py
8
app.py
|
@ -3,8 +3,6 @@ import re
|
|||
import uuid
|
||||
from flask import Flask, request, jsonify, send_from_directory
|
||||
import datetime
|
||||
import sys
|
||||
import logging
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config['UPLOAD_DIRECTORY'] = os.environ.get('UPLOAD_DIRECTORY', '/uploads')
|
||||
|
@ -14,12 +12,6 @@ VALID_FILENAME_REGEX = r'^[a-zA-Z0-9\-_\.]+$'
|
|||
|
||||
AUTH_TOKEN = os.environ.get('AUTH_TOKEN', 'myuploadtoken')
|
||||
|
||||
import sys
|
||||
import logging
|
||||
|
||||
app.logger.addHandler(logging.StreamHandler(sys.stdout))
|
||||
app.logger.setLevel(logging.INFO)
|
||||
|
||||
def is_valid_filename(filename):
|
||||
return bool(re.match(VALID_FILENAME_REGEX, filename))
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
bind = "0.0.0.0:5000"
|
||||
workers = 2
|
||||
threads = 4
|
||||
access-logfile -
|
||||
|
|
Reference in a new issue