You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the host specified in AWS_ENDPOINT is supposed to be used—and the signed URL verifies that the hostname matches—why is there a process in temporary_url that replaces the host name? Isn't that redundant or meaningless?
/** * Get a temporary upload URL for the file at the given path. * * @param string $path * @param \DateTimeInterface $expiration * @param array $options * @return array */publicfunctiontemporaryUploadUrl($path, $expiration, array$options = [])
{
$command = $this->client->getCommand('PutObject', array_merge([
'Bucket' => $this->config['bucket'],
'Key' => $this->prefixer->prefixPath($path),
], $options));
$signedRequest = $this->client->createPresignedRequest(
$command, $expiration, $options
);
$uri = $signedRequest->getUri();
// If an explicit base URL has been set on the disk configuration then we will use// it as the base URL instead of the default path. This allows the developer to// have full control over the base path for this filesystem's generated URLs.// ------- here ------------if (isset($this->config['temporary_url'])) {
$uri = $this->replaceBaseUrl($uri, $this->config['temporary_url']);
}
// ------- here ------------return [
'url' => (string) $uri,
'headers' => $signedRequest->getHeaders(),
];
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If the host specified in AWS_ENDPOINT is supposed to be used—and the signed URL verifies that the hostname matches—why is there a process in temporary_url that replaces the host name? Isn't that redundant or meaningless?
Beta Was this translation helpful? Give feedback.
All reactions