File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,16 @@ 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 by adding a
182- a ` AWS_USE_ACCELERATE_ENDPOINT=true ` env var on your ` .env ` file.
181+ To use [ S3 transfer acceleration] ( https://docs.aws.amazon.com/AmazonS3/latest/userguide/transfer-acceleration.html ) ,
182+ enable it by adding a ` AWS_USE_ACCELERATE_ENDPOINT=true ` env var on your ` .env ` file,
183+ and add ` 'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT') ` in ` s3 ` options on your ` config/filesystems.php ` :
184+
185+ ``` php
186+ 's3' => [
187+ ...
188+ 'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT'),
189+ ],
190+ ```
183191
184192#### Configuration
185193
@@ -200,7 +208,6 @@ return [
200208 */
201209 'expiry_time' => '+30 minutes',
202210 ],
203- 'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT'),
204211 ],
205212];
206213```
Original file line number Diff line number Diff line change 1414 */
1515 'expiry_time ' => '+1 hour ' ,
1616 ],
17- 'use_accelerate_endpoint ' => env ('AWS_USE_ACCELERATE_ENDPOINT ' ),
1817 ],
1918];
Original file line number Diff line number Diff line change 22
33namespace Tapp \LaravelUppyS3MultipartUpload \Http \Controllers ;
44
5- use Aws \Credentials \Credentials ;
6- use Aws \S3 \S3Client ;
75use Illuminate \Http \Request ;
86use Illuminate \Http \Response ;
7+ use Illuminate \Support \Facades \Storage ;
98use Illuminate \Support \Str ;
109use Throwable ;
1110
@@ -17,11 +16,7 @@ class UppyS3MultipartController extends Controller
1716
1817 public function __construct ()
1918 {
20- $ this ->client = new S3Client ([
21- 'version ' => 'latest ' ,
22- 'region ' => config ('filesystems.disks.s3.region ' ),
23- 'use_accelerate_endpoint ' => config ('uppy-s3-multipart-upload.s3.use_accelerate_endpoint ' ),
24- ]);
19+ $ this ->client = Storage::disk ('s3 ' )->getDriver ()->getAdapter ()->getClient ();
2520
2621 $ this ->bucket = config ('filesystems.disks.s3.bucket ' );
2722 }
You can’t perform that action at this time.
0 commit comments