By vech3114
I have successfully generated a temporary link in laravel which works correctly locally but when I try to generate a link via Storage::temporaryUrl for the production environment, it does not work. The error message is this “This driver does not support creating temporary URLs.”
The link works only with Storage::URL, but when I try to access it I get an Access Denied because it does not have a temporary key.
I was wondering if there is a way to generate a temporary URL for the link with temporary key.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
The message you’re seeing, “This driver does not support creating temporary URLs”, commonly appears when you’re trying to create a temporary URL using a storage driver that doesn’t support this function. With Laravel, temporary URLs are only supported by the S3 driver.
If you’re using the local or public driver on your production environment, you’d end up seeing this error message. To resolve this, you’ll need to switch your production environment storage driver to S3 or come up with a custom method of generating the temporary URLs.
Note: The Access Denied error when using Storage::URL suggests that the permissions on the S3 bucket might not be set up correctly.
For further information, please refer to this Laravel documentation on file storage.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.