upgrade to flask2

This commit is contained in:
2021-10-18 11:31:12 +03:00
parent f967e81a7d
commit e4888f3569
2 changed files with 4 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ from revprox import ReverseProxied
from utils import *
__FLEES_VERSION__ = "20191031.0"
__FLEES_VERSION__ = "20211018.0"
app = Flask(__name__)
app.config.from_object(__name__)
config_values = read_config(app)
@@ -575,7 +575,7 @@ def download_direct(name,token,filename):
"filename": file_path,
"operation": "direct_download"
})
return send_from_directory(directory=share['path'], filename=filename)
return send_from_directory(directory=share['path'], path=filename)
@app.route('/download/gui/<name>/<path:filename>', methods=['GET'])
@@ -843,7 +843,7 @@ def download_file(name, filename, token = None):
"filename": file_path,
"operation": "download"
})
return send_from_directory(directory=share['path'], filename=filename)
return send_from_directory(directory=share['path'], path=filename)
def file_versionize(full_path):

View File

@@ -354,7 +354,7 @@ def run_loop(opts):
def upload_file(file, opts):
print("Upload "+file)
p = Popen(
"curl -s %s%s/%s/%s | python -u - -s %d '%s'"%(
"curl -s %s%s/%s/%s | python3 -u - -s %d '%s'"%(
opts.rooturl,
"script/upload_split",
opts.share,