URL Presigned AMZON S3

前提是你 提交于 2019-12-11 04:38:38

问题


I'm not able to make url Presigned to my subdomain pointed to my bucket,

URL AMAZON - /mybucket/logo.jpg

OR

MY SUBDOMAIN - / logo.jpg

Works correctly

But when file is private, I need to generate permission, so it would look like this, but when I put the access key in the subdomain it does not work.

URL ORIGINAL AMAZON

SUBDOMAIN + KEY, DOES NOT WORK

my php code

$cmd = $client->getCommand('GetObject', [
    'Bucket' => 'teste.darpine.com',
    'Key'    => 'cover.jpg'
]);
$request = $client->createPresignedRequest($cmd, '+10 hours');
echo $presignedUrl = (string) $request->getUri();

Someone please introduce me a light.

来源:https://stackoverflow.com/questions/45094345/url-presigned-amzon-s3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!