Save 36% for Black Friday! Learn more

New Discussion

Notifications

You’re not receiving notifications from this thread.

S3 Storage and Active Storage Images not showing

3
Rails

Hey Guys,

I have S3 Storage all setup and things are workin as I am getting:

ActiveStorage::Blob Update (0.8ms)  UPDATE "active_storage_blobs" SET "metadata" = $1 WHERE "active_storage_blobs"."id" = $2 

in the terminal but my images are shouwing as broken images. Any ideas on how to fix this?

Could you share the code?

Did you figure this out? I'm having trouble setting up S3 to work with Active Storage on a Heroku environment.

Would you mind sharing your setup, please?

Check if you have rescue from routing error in your routes.rb

Something like this:

Rails.application.routes.draw do
match '*unmatched', to: 'application#route_not_found', via: :all
end

That prevents active storage path from accessing your stored image in S3, hence the broken image.

Join the discussion
Create an account Log in