-
Notifications
You must be signed in to change notification settings - Fork 21
Amazon S3 SDK Version #5
Comments
If you want to use v3 or newer of the AWS SDK, I guess the project's composer.json file needs to be updated to support v2 and v3. Or if this is not possible, updated to support v3 and released as php-s3-server 2.0. |
Just to let you know I will be trying my hand at this From this guide: The region is now required, what would be the best way to handle this, default to 'us-east-1' and then override from $_ENV if the region is set? |
I guess we do need a sensible default. We'll always know the region for v4 signature requests, since that will be sent with the signature request. But for v2 signatures, guess we'll have to have a default set and allow for that to be overridden via an environment variable or perhaps a parameter/header in the HTTP request. |
Also on the success callback to the endpoint the region wont be sent as there is no signature request I just stumbled apon getbucketlocation in the v3 SDK Will reply with my results with getbucketlocation |
Hiya I have my endpoint working with the v3 sdk, I will commit later (after work) to my fork and link here so we can discuss any changes. I did need to add some params to uploadSucess to pass the region and signature version. AFAIK there were no changes required to the signature section of endpoint.php, only for the success callback as this is where we use getS3Client I am new to github so if you would like me to commit differently then let me know :) |
Have updated endpoint.php on jaredcassidy/php-s3-server my upload page params
|
Can you open up a pull request so we can discuss further? |
Sorry for the delay, have opened pull request |
Hey there @jaredcassidy & @rnicholus, This is old news but instead of manually signing requests, why not use generate a presigned POST request using the AWS PHP SDK? https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-presigned-post.html |
composer.json
how can i use with aws-php-sdk v3+ and amazon v4 options? (locale, etc)
The text was updated successfully, but these errors were encountered: