diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2017-07-05 13:07:17 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2017-07-05 13:07:17 +0200 |
commit | 4eebb51d015e4851f55de6491c2ae7f9d0813386 (patch) | |
tree | e72d98ed41bd57a3c29e20a6855d0d41466522d2 /lib/active_vault/site/gcs_site.rb | |
parent | 571509ad12bf3bcb3190efd7494a38c4796302b8 (diff) | |
parent | 4f6410795c053930d31ee651cf03b0efa6b38e61 (diff) | |
download | rails-4eebb51d015e4851f55de6491c2ae7f9d0813386.tar.gz rails-4eebb51d015e4851f55de6491c2ae7f9d0813386.tar.bz2 rails-4eebb51d015e4851f55de6491c2ae7f9d0813386.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'lib/active_vault/site/gcs_site.rb')
-rw-r--r-- | lib/active_vault/site/gcs_site.rb | 5 |
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 |