amazon-s3-php-class
amazon-s3-php-class copied to clipboard
getAuthenticatedURL::1173 bucket error
Not sure if this is an error or just an issue when I am using it. But your commented out line at 1173 works without issue, but the following line (that assume replaced it) with $endpoint/$bucket fails for me. Is there a reason for this line? Is there something I am doing wrong?
Works (commented out code): mybucket.s3.amazonaws.com/file.mp4
Current code outputs (which fails): mybucket/file.mp4 OR mybucket.s3.amazonaws.com/mybucket/file.mp4
Yes, I can confirm that commented line `1184´ works correctly, while the newer one doesn't work.
This works
$hostBucket ? $bucket : $bucket.'.s3.amazonaws.com', $uri, self::$__accessKey, $expires
This doesn't
$hostBucket ? $bucket : self::$endpoint.'/'.$bucket, $uri, self::$__accessKey, $expires
Forcing $hostBucket
to true
when calling the function generates an invalid signature.
Just to confirm that I've found exactly the same. Only works with the commented line.
Just chiming in to say this is the same for me in 2022. the commented out line works perfect, the line that replaces in does not work as the signature does not match the URL