diff options
Diffstat (limited to 'app/models/active_storage/service/s3_service.rb')
-rw-r--r-- | app/models/active_storage/service/s3_service.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/active_storage/service/s3_service.rb b/app/models/active_storage/service/s3_service.rb index efffdec157..4c17f9902f 100644 --- a/app/models/active_storage/service/s3_service.rb +++ b/app/models/active_storage/service/s3_service.rb @@ -47,10 +47,11 @@ class ActiveStorage::Service::S3Service < ActiveStorage::Service end end - def url(key, expires_in:, disposition:, filename:) + def url(key, expires_in:, disposition:, filename:, content_type:) instrument :url, key do |payload| generated_url = object_for(key).presigned_url :get, expires_in: expires_in, - response_content_disposition: "#{disposition}; filename=\"#{filename}\"" + response_content_disposition: "#{disposition}; filename=\"#{filename}\"", + response_content_type: content_type payload[:url] = generated_url |