Reputation: 105
I'm using Google Cloud services to upload my image files. I need permanent url of images that I uploaded.
I use .service_url for getting URL of files but that links expires after 5 minutes. I try to set expires dates too long but it does not help. How can I fix this?
Upvotes: 2
Views: 1361
Reputation: 105
I found the answer.
Setting public: true solves this issue in storages.yml
For more information: https://edgeguides.rubyonrails.org/active_storage_overview.html#public-access
Upvotes: 1
Reputation: 75745
If you want a permanent link without middleware (I mean a system which catch your request and generate a temporary link for download), you can play with ACL and have this 3 solutions:
allUsers
on your objects (or your bucket) to make it public.allAuthenticated
on your objects (or your bucket).In all cases, the objects are accessible through this url https://storage.googleapis.com/<bucket>/path/to/file
Upvotes: 1