File tree 3 files changed +12
-11
lines changed
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
178
178
179
179
#### Add S3 Transfer Acceleration
180
180
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
+ ```
183
191
184
192
#### Configuration
185
193
@@ -200,7 +208,6 @@ return [
200
208
*/
201
209
'expiry_time' => '+30 minutes',
202
210
],
203
- 'use_accelerate_endpoint' => env('AWS_USE_ACCELERATE_ENDPOINT'),
204
211
],
205
212
];
206
213
```
Original file line number Diff line number Diff line change 14
14
*/
15
15
'expiry_time ' => '+1 hour ' ,
16
16
],
17
- 'use_accelerate_endpoint ' => env ('AWS_USE_ACCELERATE_ENDPOINT ' ),
18
17
],
19
18
];
Original file line number Diff line number Diff line change 2
2
3
3
namespace Tapp \LaravelUppyS3MultipartUpload \Http \Controllers ;
4
4
5
- use Aws \Credentials \Credentials ;
6
- use Aws \S3 \S3Client ;
7
5
use Illuminate \Http \Request ;
8
6
use Illuminate \Http \Response ;
7
+ use Illuminate \Support \Facades \Storage ;
9
8
use Illuminate \Support \Str ;
10
9
use Throwable ;
11
10
@@ -17,11 +16,7 @@ class UppyS3MultipartController extends Controller
17
16
18
17
public function __construct ()
19
18
{
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 ();
25
20
26
21
$ this ->bucket = config ('filesystems.disks.s3.bucket ' );
27
22
}
You can’t perform that action at this time.
0 commit comments