aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_storage_overview.md
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2017-12-29 19:56:13 -0500
committerGeorge Claghorn <george@basecamp.com>2017-12-29 19:56:13 -0500
commit6bd465e1bff36c541a992731922f967985ad0eeb (patch)
treed53be1cf736a19620d39f8d5a5d5d160a5d65324 /guides/source/active_storage_overview.md
parenta366cc43a408e3aa2ec4cb5561f47ca513ed1c24 (diff)
downloadrails-6bd465e1bff36c541a992731922f967985ad0eeb.tar.gz
rails-6bd465e1bff36c541a992731922f967985ad0eeb.tar.bz2
rails-6bd465e1bff36c541a992731922f967985ad0eeb.zip
Tweak headings [ci skip]
Diffstat (limited to 'guides/source/active_storage_overview.md')
-rw-r--r--guides/source/active_storage_overview.md32
1 files changed, 16 insertions, 16 deletions
diff --git a/guides/source/active_storage_overview.md b/guides/source/active_storage_overview.md
index 01384e014e..ec90e44358 100644
--- a/guides/source/active_storage_overview.md
+++ b/guides/source/active_storage_overview.md
@@ -206,8 +206,8 @@ production:
NOTE: Files are served from the primary service.
-Attach Files to a Model
------------------------
+Attaching Files to Records
+--------------------------
### `has_one_attached`
@@ -294,8 +294,8 @@ Call `images.attached?` to determine whether a particular message has any images
@message.images.attached?
```
-Remove File Attached to Model
------------------------------
+Removing Files
+--------------
To remove an attachment from a model, call `purge` on the attachment. Removal
can be done in the background if your application is setup to use Active Job.
@@ -309,8 +309,8 @@ user.avatar.purge
user.avatar.purge_later
```
-Link to Attachments
--------------------
+Linking to Files
+----------------
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
@@ -329,8 +329,8 @@ helper allows you to set the disposition.
rails_blob_path(user.avatar, disposition: "attachment")
```
-Transform Images
-----------------
+Transforming Images
+-------------------
To create variation of the image, call `variant` on the Blob.
You can pass any [MiniMagick](https://github.com/minimagick/minimagick)
@@ -350,8 +350,8 @@ location.
<%= image_tag user.avatar.variant(resize: "100x100") %>
```
-Preview Non-image Files
------------------------
+Previewing Files
+----------------
Some non-image files can be previewed: that is, they can be presented as images.
For example, a video file can be previewed by extracting its first frame. Out of
@@ -373,8 +373,8 @@ install them yourself to use the built-in previewers. Before you install and use
third-party software, make sure you understand the licensing implications of
doing so.
-Upload Directly to Service
---------------------------
+Direct Uploads
+--------------
Active Storage, with its included JavaScript library, supports uploading
directly from the client to the cloud.
@@ -511,8 +511,8 @@ input[type=file][data-direct-upload-url][disabled] {
}
```
-Clean up Stored Files Store During System Tests
------------------------------------------------
+Discarding Files Stored During System Tests
+-------------------------------------------
System tests clean up test data by rolling back a transaction. Because destroy
is never called on an object, the attached files are never cleaned up. If you
@@ -550,8 +550,8 @@ config.active_job.queue_adapter = :inline
config.active_storage.service = :local_test
```
-Support Additional Cloud Services
----------------------------------
+Implementing Support for Other Cloud Services
+---------------------------------------------
If you need to support a cloud service other than these, you will need to
implement the Service. Each service extends