Replace send_static_file with send_from_directory

This change is needed since our static dir is outside of the
application domain.
This commit is contained in:
Francesco Siddi 2015-10-08 14:52:21 +02:00
parent 19500f6a80
commit 362e8faf7b

View File

@ -64,7 +64,8 @@ def build_thumbnails(file_path=None, file_id=None):
def index(file_name=None):
#GET file
if file_name:
return file_storage.send_static_file(file_name)
return file_storage.send_from_directory(app.config['STORAGE_DIR'],
file_name)
#POST file
file_name = request.form['name']
folder_name = file_name[:2]