@@ -18,10 +18,10 @@ |
||
| 18 | 18 | $disk = Storage::disk($this->helper->config('disk')); |
| 19 | 19 | $config = $disk->getConfig(); |
| 20 | 20 | |
| 21 | - if (key_exists('driver', $config) && $config['driver'] == 's3') { |
|
| 21 | + if (key_exists('driver', $config) && $config[ 'driver' ] == 's3') { |
|
| 22 | 22 | $duration = $this->helper->config('temporary_url_duration'); |
| 23 | 23 | return response()->streamDownload( |
| 24 | - function () { |
|
| 24 | + function() { |
|
| 25 | 25 | echo file_get_contents($disk->temporaryUrl($file->path('storage'), now()->addMinutes($duration))); |
| 26 | 26 | }, $file_name, |
| 27 | 27 | ); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | { |
| 46 | 46 | $config = $this->disk->getConfig(); |
| 47 | 47 | |
| 48 | - if (key_exists('driver', $config) && $config['driver'] == 's3') |
|
| 48 | + if (key_exists('driver', $config) && $config[ 'driver' ] == 's3') |
|
| 49 | 49 | |
| 50 | 50 | $duration = $this->helper->config('s3.temporary_url_expiration'); |
| 51 | 51 | return $this->disk->temporaryUrl($path, now()->addMinutes($duration)); |
@@ -45,9 +45,10 @@ |
||
| 45 | 45 | { |
| 46 | 46 | $config = $this->disk->getConfig(); |
| 47 | 47 | |
| 48 | - if (key_exists('driver', $config) && $config['driver'] == 's3') |
|
| 49 | - |
|
| 48 | + if (key_exists('driver', $config) && $config['driver'] == 's3') { |
|
| 49 | + |
|
| 50 | 50 | $duration = $this->helper->config('s3.temporary_url_expiration'); |
| 51 | + } |
|
| 51 | 52 | return $this->disk->temporaryUrl($path, now()->addMinutes($duration)); |
| 52 | 53 | |
| 53 | 54 | else { |