Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

Refile :fill does not work for me

Gems / Libraries • Asked by Wesly Mezarina

I have the refile gem connected with aws by following the instruction on their github. For an image i would get something like

/attachments/store/78b928c7897e3b12de80cf1ffdfdfdfdf/image.jpg

which works but when i try to use the :fill that refile provides my images don't display. You can see that i have the fill/400/400 in the url below.

/attachments/store/fill/400/400/78b928c7897e3b12de80cf1ffdfdfdfdf/image.jpg

I'm guessing that i have to change the way aws stores the image in this code.

require "refile/backend/s3"

aws = {
  access_key_id: "xyz",
  secret_access_key: "abc",
  bucket: "my-bucket",
}
Refile.cache = Refile::Backend::S3.new(prefix: "cache", **aws)
Refile.store = Refile::Backend::S3.new(prefix: "store", **aws)

I'm not quite sure how the AWS storage works with the resized images. I'm guessing it downloads a copy of the image to your server from S3 and then resizes it, but maybe it's slow to reprocess things.

I wouldn't consider myself a refile expert and I'm not using it in production anywhere, but I would post this on the Refile github issues: https://github.com/elabs/refile


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.