aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/models/active_storage
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/app/models/active_storage')
-rw-r--r--activestorage/app/models/active_storage/blob.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/models/active_storage/blob.rb b/activestorage/app/models/active_storage/blob.rb
index 8fb53fa787..df4f6f6075 100644
--- a/activestorage/app/models/active_storage/blob.rb
+++ b/activestorage/app/models/active_storage/blob.rb
@@ -201,7 +201,7 @@ class ActiveStorage::Blob < ActiveRecord::Base
# with users. Instead, the +service_url+ should only be exposed as a redirect from a stable, possibly authenticated URL.
# Hiding the +service_url+ behind a redirect also gives you the power to change services without updating all URLs. And
# it allows permanent URLs that redirect to the +service_url+ to be cached in the view.
- def service_url(expires_in: service.url_expires_in, disposition: :inline)
+ def service_url(expires_in: service.url_expires_in, disposition: :inline, filename: self.filename)
service.url key, expires_in: expires_in, disposition: forcibly_serve_as_binary? ? :attachment : disposition, filename: filename, content_type: content_type
end