Skip to content
Snippets Groups Projects
Commit b119feeb authored by Jonas Leder's avatar Jonas Leder
Browse files

redirect user to download page

parent 9c1a1b9b
Branches
No related tags found
1 merge request!1Get files from s3
......@@ -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();
\ No newline at end of file
$downloadURL = (string) $presignedRequest->getUri();
header("Location: $downloadURL");
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment