From ac85fbf40fc2292179a8c2a814e4dba7eae07ccb Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Sat, 15 Jun 2024 13:21:51 +0500 Subject: [PATCH] update docs to add custom parameters --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index e77c6d0..5c3c0a2 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,20 @@ You can use the same syntax used for S3 disk. Storage::disk('local')->temporaryUrl('file.txt', now()->addMinutes(5)); ``` +### Pass Parameters +You can pass parameters to the temporaryUrl function for ef filename. +```php +Storage::disk('local')->temporaryUrl('file.txt', now()->addMinutes(5), ['filename' => 'customname']); +``` + +Not just file name, you can pass other options as well (with respect to disk) +```php +[ + 'ResponseContentType' => 'application/octet-stream', + 'ResponseContentDisposition' => 'attachment; filename=file2.jpg', +] +``` + ## Testing ```bash