From 5944850bc1259ca42381ce83d155ddd914b968c6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 23 Jul 2017 17:50:31 -0500 Subject: Tell service which content-type to use for the response --- app/controllers/active_storage/disk_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers') 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 -- cgit v1.2.3