Commit 1e530eb3 authored by Doug Stewart's avatar Doug Stewart Committed by GitHub
Browse files

Update README to document `S3_UPLOADS_BUCKET_URL`

A brief paragraph for describing the built-in URL rewrites capabilities for S3U.
parent bcb0a709
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -136,9 +136,17 @@ in your `wp-config.php`:
define( 'S3_UPLOADS_AUTOENABLE', false );
```

To then enabled S3 Uploads rewriting, use the wp-cli command: `wp s3-uploads enable` / `wp s3-uploads disable`
To then enable S3 Uploads rewriting, use the wp-cli command: `wp s3-uploads enable` / `wp s3-uploads disable`
to toggle the behaviour. 

URL Rewrites
=======
By default, S3 Uploads will use the canonical S3 URIs for referencing the uploads, i.e. `[bucket name].s3.amazonaws.com/uploads/[file path]`. If you want to use another URL to serve the images from (for instance, if you [wish to use S3 as an origin for CloudFlare](https://support.cloudflare.com/hc/en-us/articles/200168926-How-do-I-use-CloudFlare-with-Amazon-s-S3-Service-)), you should define `S3_UPLOADS_BUCKET_URL` in your `wp-config.php`:

```PHP
define( 'S3_UPLOADS_BUCKET_URL`, '[Your origin domain/URL]' );
```

Offline Development
=======