From ece526955843d1d1bd05f60c75666d82f5b3009a Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Thu, 10 Mar 2016 11:51:25 +0100 Subject: [PATCH] Removing custom endpoint for file_storage.index This was breaking links for storage backends different than gcs. --- pillar/application/modules/file_storage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pillar/application/modules/file_storage.py b/pillar/application/modules/file_storage.py index e967db8a..9f2d6dc1 100644 --- a/pillar/application/modules/file_storage.py +++ b/pillar/application/modules/file_storage.py @@ -108,7 +108,7 @@ def build_thumbnails(file_path=None, file_id=None): @file_storage.route('/file', methods=['POST']) -@file_storage.route('/file/', endpoint='index_with_path', methods=['GET', 'POST']) +@file_storage.route('/file/', methods=['GET', 'POST']) def index(file_name=None): # GET file -> read it if request.method == 'GET': @@ -135,7 +135,7 @@ def index(file_name=None): request.files['data'].save(file_path) # TODO: possibly nicer to just return a redirect to the file's URL. - return jsonify({'url': url_for('file_storage.index_with_path', file_name=file_name)}) + return jsonify({'url': url_for('file_storage.index', file_name=file_name)}) def process_file(src_file):