I try to custom the url of my links, the subdomain is ok but now I don't know how to get my signed URLs with my subdomain, I tried to add 'base_url' => 'http://sub.domain.com' but nothing... any idea ?
My actual code:
<?php
require 'app/start.php';
$object = 'test.txt';
$cmd = $s3->getCommand('GetObject', [
'Bucket' => $config['s3']['bucket'],
'Key' => $object,
]);
$request = $s3->createPresignedRequest($cmd, '+60 minutes');
$presignedUrl = (string) $request->getUri();
?>
<!DOCTYPE html>
<html>
<head>
<title>Token</title>
</head>
<body>
<a href="<?php echo $presignedUrl; ?>">Download</a>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire