简体   繁体   中英

Show images from S3 bucket into Ruby-on-Rails application

I have setup an S3 bucket with name ' mobiles ' and populated it with around 2000 images. The bucket has a folder structure as well like ' mobiles / vendor-name / model-name / model-image.jpg '.

In my rails application which I have hosted on Heroku, I want to show the list of those images against vendors and models. How can I do that ? (i mean linking them from S3 directly)

I already have saved vendors and models in Postgresql database.

I am new to RoR world so please explain the answer considering the fact.

Just check that every image have the right permissions.

权限

Under the properties tab of every image, you could see a link to that image.

在此处输入图片说明

In your case is probably that looks like https://s3.amazonaws.com/mobiles/vendor-name/model... .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM