目前,我将经过身份验证的 URL 生成为:
$this->s3Client = new S3Client($this->options);
$cmd = $this->s3Client->getCommand('GetObject', [
'Bucket' => $bucket_name,
'Key' => $object_key
]);
$request = $this->s3Client->createPresignedRequest($cmd, PRESIGNED_URL_VALIDITY);
$presignedUrl = (string) $request->getUri();
有没有一种方法可以让我自己在经过身份验证的 URL 中生成查询参数而不使用createPresignedRequest
.
我需要单独创建:
?X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=
&X-Amz-Date=20130721T201207Z
&X-Amz-Expires=86400
&X-Amz-SignedHeaders=host
&X-Amz-Signature=<signature-value>
并将其附加到存储桶文件路径以使其成为预签名请求。