laravel s3 presigned url

Solutions on MaxInterview for laravel s3 presigned url by the best coders in the world

showing results for - "laravel s3 presigned url"
Luciano
22 Aug 2016
1$s3 = \Storage::disk('s3');
2$client = $s3->getDriver()->getAdapter()->getClient();
3$expiry = "+10 minutes";
4
5$command = $client->getCommand('GetObject', [
6    'Bucket' => \Config::get('filesystems.disks.s3.bucket'),
7    'Key'    => "file/in/s3/bucket"
8]);
9
10$request = $client->createPresignedRequest($command, $expiry);
11
12return (string) $request->getUri();