Hi all, wondering if anyone has found a solution f...
# support
z
Hi all, wondering if anyone has found a solution for the below. I have tried avoiding expiring urls but this did not resolve the issue.
Copy code
config.active_storage.service_urls_expire_in = false
āœ… 1
j
Have you confirmed that the URLs that are being generated aren't expiring URLs? Can you post one for reference?
z
you are right they are still expiring, I should have checked it seems that line did not work as expected: https://permanence-bucket.s3.amazonaws.com/fltfh5bqfitrbhccjfckyhs8ws2m?response-content-dispo[…]53d4ec9a24695e85f9cc123b30b100397316640e35a400cee4d
@Jared Norman do you have any resources by any chance that could guide me in the right direction?
j
You have two main options: • What I would do: configure the bucket so everything is public. I'm pretty sure I've seen that work just fine before. ActiveStorage stopped generating the expiring URLs in that case. • Hypothetically works: remove the caching from the part of the page with the images in it. I don't normally use ActiveStorage, so I'm not the best person to ask. I'm just very familiar that this problem exists. šŸ˜…
c
The PR that I referenced in the other thread points to this documentation - https://edgeguides.rubyonrails.org/active_storage_overview.html#public-access
If you follow that recommendation you would want to ensure every file in the bucket is publicly readable before you switch over
z
Fantastic! got it working. I created a new bucket with public settings and added the line below to the aws config in storage.yml Thanks again very happy to have it sorted.
Copy code
public: true
šŸŽ‰ 1