Using url_for()
on a file stored in active storage returns a url that leads to the application and then redirects to the actual location. Because of a bug in firefox with CORS, the redirect breaks my application.
Is there any way to get the direct link to the file with ActiveStorage?
You can do this
record.active_storage_object.blob.service.url
Found here https://github.com/rails/rails/blob/main/activestorage/app/models/active_storage/blob.rb#L213