Report this

What is the reason for this report?

How to show DigitalOcean private Spaces temporaryURL on Laravel?

Posted on September 28, 2021

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.