aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_vault
diff options
context:
space:
mode:
Diffstat (limited to 'lib/active_vault')
-rw-r--r--lib/active_vault/site/gcs_site.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/active_vault/site/gcs_site.rb b/lib/active_vault/site/gcs_site.rb
index e509ebbbd2..49cbf5d9cb 100644
--- a/lib/active_vault/site/gcs_site.rb
+++ b/lib/active_vault/site/gcs_site.rb
@@ -27,6 +27,11 @@ class ActiveVault::Site::GCSSite < ActiveVault::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