Skip to content

Commit

Permalink
add options argument to temporaryUrl() (#20394)
Browse files Browse the repository at this point in the history
This allows users to specify additions command arguments such as: `ResponseContentDisposition`.
  • Loading branch information
tillkruss authored and taylorotwell committed Aug 2, 2017
1 parent 2086522 commit 868d6dc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Illuminate/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,10 @@ protected function getLocalUrl($path)
*
* @param string $path
* @param \DateTimeInterface $expiration
* @param array $options
* @return string
*/
public function temporaryUrl($path, $expiration)
public function temporaryUrl($path, $expiration, array $options = [])
{
$adapter = $this->driver->getAdapter();

Expand All @@ -397,10 +398,10 @@ public function temporaryUrl($path, $expiration)
throw new RuntimeException('This driver does not support creating temporary URLs.');
}

$command = $client->getCommand('GetObject', [
$command = $client->getCommand('GetObject', array_merge([
'Bucket' => $adapter->getBucket(),
'Key' => $adapter->getPathPrefix().$path,
]);
], $options));

return (string) $client->createPresignedRequest(
$command, $expiration
Expand Down

0 comments on commit 868d6dc

Please sign in to comment.