Comments (9)
I've successfully uploaded a test file to 'eu-west-1' region using 'example-form.php' file.
Can you post an example code?
from amazon-s3-php-class.
Unfortunately there is no region detection, so you'd need to call S3::setEndpoint() to access other endpoints first:
S3::setEndpoint('s3-eu-west-1.amazonaws.com');
from amazon-s3-php-class.
From what I know, S3 is cross-region, which means that you do not need to specify a region to upload files to, as it will uploads to one and replicates to other regions behind the scenes. Therefor endpoint = 's3.amazonaws.com'
If your bucket called 'test', you will upload to 'test.s3.amazonaws.com', not to 'test.s3-eu-west-1.amazonaws.com'.
from amazon-s3-php-class.
Seems you could be right about that @dekelev - will need to look into it a little more.
from amazon-s3-php-class.
I can confirm that @tpyo 's suggestion of setting the endpoint manually using the following worked for me.
$s3 = new S3(); $s3->setEndpoint('s3-eu-west-1.amazonaws.com');
(even though I was setting the public static $endpoint = 's3-eu-west-1.amazonaws.com';
in S3.php)
FYI I'm using a bucket in Region: Ireland
from amazon-s3-php-class.
well I read about it here, and under "Regions" it says you do create the S3 bucket in a region and it replictes only within that region, not to other regions, so it make sense to use a region specific domain name.
http://aws.amazon.com/s3/faqs/#Where_is_my_data_stored
from amazon-s3-php-class.
I'm coming across a similar issue. So the https://BUCKETNAME.s3.amazonaws.com/PATH/TO/FILE format is region-agnostic, but you have to make sure that the bucket name is DNS compatiable. When you put the request into the above format, what the web server does is convert all letters in the bucket name to lower case. So if the bucket name has upper case letters, you'll get "The specified bucket does not exist."
I do not think that it's coincidental that for regions outside of "US Standard," we can only use numbers and lower case letters in bucket names.
from amazon-s3-php-class.
Figured out my issue. My app is in Node and it turns out there's a global config where you specify a region. So you're basically confined to accessing buckets in the stated region. Seems inflexible. Am wondering what the reason behind it is.
from amazon-s3-php-class.
This does appear to matter, at least in my use case. When instantiating the S3 object and trying to use any of the methods if I do not specify the region like this $s3->setEndpoint('s3-us-west-1.amazonaws.com');
it will not work. Specifically noticed this with getObject
from amazon-s3-php-class.
Related Issues (20)
- S3.php uses AWS API that will be deprecated on June 6th 2019
- SignatureDoesNotMatch error HOT 2
- Easy fix for getObjectInfo bug
- Missing setSignatureVersion function HOT 1
- Issue on uploading in Asia Mumbai region bucket.
- S3.php is huge and is becoming unmanageable :(
- putObject problem
- AuthorizationHeaderMalformed: the region 'us-east-1' is wrong; expecting 'ap-northeast-1' HOT 3
- Access denied on deleteObject
- error messages
- Could I prevent invalidation?
- ListBuckets does not work on non-amazon services HOT 12
- Install region eu-west-1 default
- Does it support tagging? HOT 1
- Haveing 2 buckets in the same region
- Deprecated: Array and string offset access syntax with curly braces
- openssl_free_key() is deprecated in PHP8
- De-static-ified version of S3 with tagging
- PHP 8 Issues HOT 2
- How To Get Public URL Of Object After Uploading A File Object?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-s3-php-class.