diff options
| author | Xinhui | 2017-03-06 12:58:34 +0100 |
|---|---|---|
| committer | Xinhui | 2017-03-06 12:58:34 +0100 |
| commit | d0e1b2ec190143a092ab03d4febe5c3b4271c2e2 (patch) | |
| tree | fe6bd4a5b5503988e114490de4349fe58d53ce4e /app | |
| parent | 156133d5bdbc05fd283f50396f776b43e49e5249 (diff) | |
| download | chouette-core-d0e1b2ec190143a092ab03d4febe5c3b4271c2e2.tar.bz2 | |
Imports#download action
Refs #2719
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/imports_controller.rb | 8 |
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 |
