aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_storage_overview.md
diff options
context:
space:
mode:
authorJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-20 17:01:00 -0800
committerJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-20 17:01:00 -0800
commit686b3466bab78ca69eaab98d76cc489d84d5eb62 (patch)
treee28c072913fb76b0f7958c067b372537b0fd606c /guides/source/active_storage_overview.md
parented8b299ec02607aee63788915b41d2dab8b142ff (diff)
downloadrails-686b3466bab78ca69eaab98d76cc489d84d5eb62.tar.gz
rails-686b3466bab78ca69eaab98d76cc489d84d5eb62.tar.bz2
rails-686b3466bab78ca69eaab98d76cc489d84d5eb62.zip
Adds download link helper explanation
Diffstat (limited to 'guides/source/active_storage_overview.md')
-rw-r--r--guides/source/active_storage_overview.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/guides/source/active_storage_overview.md b/guides/source/active_storage_overview.md
index c3262c85e0..4b48d67e60 100644
--- a/guides/source/active_storage_overview.md
+++ b/guides/source/active_storage_overview.md
@@ -117,7 +117,7 @@ local:
bucket: ""
```
-Also, add the S3 client gem to your Gemfile:
+Also, add the Google Cloud Storage client gem to your Gemfile:
``` ruby
gem "google-cloud-storage", "~> 1.3", require: false
@@ -245,7 +245,7 @@ Link to Attachments
Generate a permanent URL for the blob that points to the application. Upon
access, a redirect to the actual service endpoint is returned. This indirection
-decouples the public URL from the actual one, and allows for example mirroring
+decouples the public URL from the actual one, and allows, for example, mirroring
attachments in different services for high-availability. The redirection has an
HTTP expiration of 5 min.
@@ -253,6 +253,13 @@ HTTP expiration of 5 min.
url_for(user.avatar)
```
+To create a download link, use the `rails_blob_{path|url}` helper. Using this
+helper will allow you to set the filename and disposition.
+
+```ruby
+rails_blob_path(user.avatar, disposition: "attachment", filename: "avatar.jpg")
+```
+
Create Variations of Attached Image
-----------------------------------