aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorXinhui2017-03-06 12:58:34 +0100
committerXinhui2017-03-06 12:58:34 +0100
commitd0e1b2ec190143a092ab03d4febe5c3b4271c2e2 (patch)
treefe6bd4a5b5503988e114490de4349fe58d53ce4e /app/controllers
parent156133d5bdbc05fd283f50396f776b43e49e5249 (diff)
downloadchouette-core-d0e1b2ec190143a092ab03d4febe5c3b4271c2e2.tar.bz2
Imports#download action
Refs #2719
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/imports_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb
index 3eab7e66b..9b2101584 100644
--- a/app/controllers/imports_controller.rb
+++ b/app/controllers/imports_controller.rb
@@ -21,6 +21,14 @@ class ImportsController < BreadcrumbController
end
end
+ def download
+ if params[:token] == resource.token_download
+ send_file resource.file.path
+ else
+ user_not_authorized
+ end
+ end
+
private
def import_params