Skip to content

Conversation

chinmaypurav
Copy link
Contributor

Most of the time I work with temporary URLs when working with private media. It is very cumbersome to set the expiration time for every $model->getFirstTemporaryUrl(now()->addMinutes(5))

To overcome this, I am submitting this PR, where, if no arg is passed, a default time is set, can be configured from config.

This want I can do

// Before
$model->getFirstTemporaryUrl(now()->addMinutes(5));

// After
$model->getFirstTemporaryUrl();

@freekmurze freekmurze merged commit 89c58bb into spatie:main Aug 19, 2025
1 check passed
@freekmurze
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants