better link for flip, maybe now, a little hack

This commit is contained in:
2018-08-21 15:31:49 +03:00
parent b4cb2ba246
commit b9f35e2a51
2 changed files with 10 additions and 4 deletions

View File

@@ -373,8 +373,14 @@ def file_direct(name, token, filename):
if not allow_direct:
return "-1", 403
token = get_direct_token(share, filename)
url = url_for('download_direct', name = name, token = token, filename = filename )
return url, 200
# url_for returns extra level of /../path if proxying with nginx
return "/".join((
app.config['PUBLIC_URL'],
'direct',
name,
token,
path2url(filename)
)), 200
@app.route('/file/ls/<name>/<token>', methods=['GET'])