redirect user to download page

This commit is contained in:
Jonas Leder 2021-05-13 23:07:03 +02:00
parent 9c1a1b9b36
commit b119feeb17

View file

@ -20,7 +20,8 @@ $command = $s3Client->getCommand('GetObject', [
]);
// Create a pre-signed URL for a request with duration of 10 miniutes
$presignedRequest = $s3Client->createPresignedRequest($command, '1000 minutes');
$presignedRequest = $s3Client->createPresignedRequest($command, '60 minutes');
// Get the actual presigned-url
echo (string) $presignedRequest->getUri();
$downloadURL = (string) $presignedRequest->getUri();
header("Location: $downloadURL");