aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2017-07-23 17:50:31 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2017-07-23 17:50:31 -0500
commit5944850bc1259ca42381ce83d155ddd914b968c6 (patch)
treea8579cc18b2d412a978b02385f15a22c56dd3ac4 /app/controllers
parentcb2f7d499466acd2a8c9b917262914e46b5bf104 (diff)
downloadrails-5944850bc1259ca42381ce83d155ddd914b968c6.tar.gz
rails-5944850bc1259ca42381ce83d155ddd914b968c6.tar.bz2
rails-5944850bc1259ca42381ce83d155ddd914b968c6.zip
Tell service which content-type to use for the response
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/active_storage/disk_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/active_storage/disk_controller.rb b/app/controllers/active_storage/disk_controller.rb
index a42b4833a7..986eee6504 100644
--- a/app/controllers/active_storage/disk_controller.rb
+++ b/app/controllers/active_storage/disk_controller.rb
@@ -11,8 +11,8 @@
class ActiveStorage::DiskController < ActionController::Base
def show
if key = decode_verified_key
- # FIXME: Find a way to set the correct content type
- send_data disk_service.download(key), filename: params[:filename], disposition: disposition_param
+ # FIXME: Do we need to sign or otherwise validate the content type?
+ send_data disk_service.download(key), filename: params[:filename], disposition: disposition_param, content_type: params[:content_type]
else
head :not_found
end