Level 4
The best way to do this is to make the object private in Spaces and then use a pre-signed URL to access the file.
Check out the "Temporary URLs" section at https://laravel.com/docs/7.x/filesystem#file-urls
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a laravel app that store some files on Digital Ocean Spaces. I make the file public, but is it possible to filter only authenticated user to download the files?
The best way to do this is to make the object private in Spaces and then use a pre-signed URL to access the file.
Check out the "Temporary URLs" section at https://laravel.com/docs/7.x/filesystem#file-urls
Please or to participate in this conversation.