Skip to content

Commit cf28d85

Browse files
committed
Move S3 accelerate config to the package config file
1 parent 39aa601 commit cf28d85

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -178,20 +178,8 @@ https://uppy.io/docs/aws-s3/#S3-Bucket-configuration
178178

179179
#### Add S3 Transfer Acceleration
180180

181-
To use [S3 transfer acceleration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html), enable it adding a `'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT')` option on `s3` key in `config/filesystems.php` file:
182-
183-
```php
184-
's3' => [
185-
...
186-
'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT'),
187-
],
188-
```
189-
190-
Add on your `.env` file this env var:
191-
192-
```
193-
AWS_USE_ACCELERATE_ENDPOINT=true
194-
```
181+
To use [S3 transfer acceleration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html), enable it by adding a
182+
a `AWS_USE_ACCELERATE_ENDPOINT=true` env var on your `.env` file.
195183

196184
#### Configuration
197185

@@ -212,6 +200,7 @@ return [
212200
*/
213201
'expiry_time' => '+30 minutes',
214202
],
203+
'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT'),
215204
],
216205
];
217206
```

config/uppy-s3-multipart-upload.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
*/
1515
'expiry_time' => '+1 hour',
1616
],
17+
'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT'),
1718
],
1819
];

src/Http/Controllers/UppyS3MultipartController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct()
1919
$this->client = new S3Client([
2020
'version' => 'latest',
2121
'region' => config('filesystems.disks.s3.region'),
22-
'use_accelerate_endpoint' => config('filesystems.disks.s3.use_accelerate_endpoint'),
22+
'use_accelerate_endpoint' => config('uppy-s3-multipart-upload.s3.use_accelerate_endpoint'),
2323
'credentials' => [
2424
'key' => config('filesystems.disks.s3.key'),
2525
'secret' => config('filesystems.disks.s3.secret'),

0 commit comments

Comments
 (0)