aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_storage_overview.md
diff options
context:
space:
mode:
authorJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-30 09:19:57 -0800
committerJeffrey Guenther <guenther.jeffrey@gmail.com>2017-11-30 09:19:57 -0800
commit29051b60a26951ee71d9129a4eb5bc399f9a6cb0 (patch)
tree4b4683c8efbdf84d7fb34a63cf6bc87a81aebc27 /guides/source/active_storage_overview.md
parent858e5cd09cc5b3f387ff358f51e87ab85feb0fb9 (diff)
downloadrails-29051b60a26951ee71d9129a4eb5bc399f9a6cb0.tar.gz
rails-29051b60a26951ee71d9129a4eb5bc399f9a6cb0.tar.bz2
rails-29051b60a26951ee71d9129a4eb5bc399f9a6cb0.zip
Change info to note
Diffstat (limited to 'guides/source/active_storage_overview.md')
-rw-r--r--guides/source/active_storage_overview.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/guides/source/active_storage_overview.md b/guides/source/active_storage_overview.md
index 943df46d21..537a0e841d 100644
--- a/guides/source/active_storage_overview.md
+++ b/guides/source/active_storage_overview.md
@@ -190,6 +190,8 @@ production:
- s3_west_coast
```
+NOTE: Files are served from the primary service.
+
Mirrored services can be used to facilitate a migration between services in
production. You can start mirroring to the new service, copy existing files from
the old service to the new, then go all-in on the new service.
@@ -349,14 +351,19 @@ directly from the client to the cloud.
1. Include `activestorage.js` in your application's JavaScript bundle.
Using the asset pipeline:
+
```js
//= require activestorage
+
```
+
Using the npm package:
+
```js
import * as ActiveStorage from "activestorage"
ActiveStorage.start()
```
+
2. Annotate file inputs with the direct upload URL.
```ruby
@@ -385,6 +392,7 @@ You can use these events to show the progress of an upload.
![direct-uploads](https://user-images.githubusercontent.com/5355/28694528-16e69d0c-72f8-11e7-91a7-c0b8cfc90391.gif)
To show the uploaded files in a form:
+
```js
// direct_uploads.js
@@ -426,7 +434,7 @@ addEventListener("direct-upload:end", event => {
})
```
-Add styles:
+Add styles:
```css
/* direct_uploads.css */