I have an application that deploys in heroku using amazon s3, posting images to buckets.This works fine. But when retrieving the same image, an error occurs:
Errno::ENOENT (No such file or directory showing path s3.amazonaws.com/bucket_name/app/public/messages/images/000/000/061/thumb/images.jpeg?1362410115)
The same copying and pasting the path into the browser url does not work. If I use the name of the bucket as the endpoint, it works, i.e. With the following path
/bucket_name.s3.amazonaws.com/app/public/messages/images/000/000/061/thumb/images.jpeg?1362410115.
But I do not know how to configure this url in my model. I follow the heroku method for setting up aws-sdk.
https:
The has_attached_file model is similar to the fact that I missed something. For the rest of the configuration, you can check the link above.
has_attached_file :image, :styles => { :medium => "100x100>", :thumb => "100x100>" }
thanks
source share