This commit is contained in:
flaskfarm
2022-10-18 10:31:15 +09:00
parent 1705e9fc2b
commit e30ca52a9a
4 changed files with 6 additions and 8 deletions

View File

@@ -86,16 +86,12 @@ def open_file(path):
@F.app.route("/file/<path:path>")
@F.check_api
def file2(path):
F.logger.debug('file2 :%s', path)
return send_from_directory('/', path)
# 윈도우 drive 필요 없음
return send_from_directory('/', path, as_attachment=True)
@F.app.route("/upload", methods=['GET', 'POST'])
def upload():
# curl -F file=@downloader_video.tar https://dev.soju6jan.com/up
#
try:
if request.method == 'POST':
f = request.files['file']

View File

@@ -1 +1 @@
VERSION="4.0.20"
VERSION="4.0.21"

View File

@@ -61,7 +61,9 @@ def get_model_setting(package_name, logger, table_name=None):
@staticmethod
def get_datetime(key):
try:
return datetime.strptime(ModelSetting.get(key), '%Y-%m-%d %H:%M:%S.%f')
tmp = ModelSetting.get(key)
if tmp != None and tmp != '':
return datetime.strptime(tmp, '%Y-%m-%d %H:%M:%S.%f')
except Exception as e:
logger.error(f"Exception:{str(e)} [{key}]")
logger.error(traceback.format_exc())

Binary file not shown.