Closed johannesnagl closed 10 years ago
Would have to look into it, but nothing comes to me off the top of my head. Most likely something changed in the AWS SDK.
do you know of any other stable implementations of the latest uploader with AWS support? would love to see other configuration(-hacks) :)
I haven't used the uploader in over a year, so I can't really say which version works best :/.
Perhaps try lowering the AWS version until it works? If it does work at some point, could you let me know which version it broke at?
Hi miles!
It looks like it's related to the bucket(-region). When referencing an EU_WEST_1
bucket, everything's fine. When referencing an EU_CENTRAL_1
bucket, the upload process breaks.
So it's somehow unrelated to the AWS SDK version (still on 2.7.2) and the uploader. I think it's related to the fact, that EU_CENTRAL_1 only supports AWS Authenticating with V4 Standard (instead of the old V2 standard).
I will dig into this and keep you posted!
ok,
the problem is the following call within milesj/transit: https://github.com/milesj/transit/blob/master/src/Transit/Transporter/Aws/S3Transporter.php#L159
The method S3Client::getEndpoint
(https://github.com/aws/aws-sdk-php/blob/master/src/Aws/Common/Client/AbstractClient.php#L115) is deprecated and does not work with newer regions.
The solution for us, at the moment, is to define the region for our selves. (https://github.com/aws/aws-sdk-php/blob/master/src/Aws/S3/Resources/s3-2006-03-01.php)
Sorry for the misleading issue!
Awesome, thanks for looking into it. I'll look around for an alternative to getEndpoint()
. Hopefully it's not too complicated. It's like the third time I've had to change that code because AWS changes their minds <_<.
Hi miles, have a look at this comment: https://github.com/aws/aws-sdk-php/pull/385
That looks perfect, cheers.
This should be fixed in 4.6.0.
thx, we updated to the latest version and it works like expected.
Sweet, thanks for the help also!
Hi Miles!
We're experiencing multiple problems with the latest CakeUploader (4.5.5) and the latest AWS SDK PHP (2.7.2)
composer.json:
User.php:
The problems in detail:
In previous versions of the Uploader (4.2.0) the same setup had moved the files correctly to AWS and saved the complete bucket-url (like https://bucket.s3.amazon.com/filename.jpg (without /files/uploads)) to the database.
The only thing we managed to fix was the following scenario:
adding the following code
to the user model would lead to the following situation:
Do you have any help?