diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/active_file/site/gcs_site.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/active_file/site/gcs_site.rb b/lib/active_file/site/gcs_site.rb index c5f3d634cf..001339f2bd 100644 --- a/lib/active_file/site/gcs_site.rb +++ b/lib/active_file/site/gcs_site.rb @@ -27,6 +27,11 @@ class ActiveFile::Site::GCSSite < ActiveFile::Site end + def url(key, expires_in:, disposition:, filename:) + file_for(key).signed_url(expires: expires_in) + "&" + + { "response-content-disposition" => "#{disposition}; filename=\"#{filename}\"" }.to_query + end + def byte_size(key) file_for(key).size end |