Hello, is there a way to create a signed URL for Amazon S3 since I can not publicize my buckets?
Thank You!
Hello, is there a way to create a signed URL for Amazon S3 since I can not publicize my buckets?
Thank You!
Hi @hosmelq
If you want to generate a signed URL for a file stored in Amazon S3, you can make use of Laravel’s Filesystem’s temporaryUrl()
method. This method requires two arguments: the path towards the file and the expiration time (in minutes) for the signed URL.
The code below demonstrates how to generate a signed URL for a file stored in Amazon S3:
$url = \Storage::disk('s3')->temporaryUrl('path/to/file.txt', 60);