S3 get_driver using region name
See original GitHub issueFor some reason it seems there is one driver for each S3 region. Thus we cannot dynamically get a s3 driver depending on the region string.
For example something like this:
cls = get_driver(Provider.S3, region_name='eu-west-1')
Or maybe it would be better to have only one S3StorageDriver class where we can specify the region during construction.
driver = cls(access_key_id, secret_acces_key, region=region_name, region_name=region_name)
Though it seems there is two region attribute which should match. region_name
from S3StorageDriver
and region
from AWSDriver
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Laravel league/flysystem getting file URL with AWS S3
I am using Laravel 5.2 and the code below seemed to work fine. Storage::cloud()->url('filename');.
Read more >Get the Region where the Amazon S3 bucket resides using an ...
Get the Region where the Amazon S3 bucket resides using an AWS SDK. PDFRSS. The following code example shows how to get the...
Read more >How to upload file private mode and retrive by generated url ...
Here is complete code: upload file in aws s3 from laravel 5.3 or 5.4 Run: ... file or video (i have upload one...
Read more >Upload files to S3 and generate previews using Laravel
Our Document model will have a name , file (a URL on S3 to our original file), preview_url (a URL to a preview...
Read more >File Storage - Laravel - The PHP Framework For Web Artisans
Before using the S3 driver, you will need to install the Flysystem S3 ... For this reason, we recommend always storing your files...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The best approach would probably be to support
region
argument in the driver constructor.That’s something we already do in other drivers and similar to what you suggested in option 2).
Thanks for confirming 😃