简体   繁体   中英

Heroku app not pulling S3 images on other machines

I recently added photo uploading to a web application that I'm hosting on heroku. I'm using S3 for storage and it's working great, however when other users go onto the site, they see a photo missing icon rather than the photo. On my machine however, I see the photos on the site. Any clues as to what is happening? Thanks!

When you upload your photos to s3 you need to set their access level to public using whatever s3 lib your using.

Here's snippet from s3 api docs:

x-amz-acl The canned ACL to apply, to the object that is created after completing multipart upload. For more information, go to REST Access Policy in the Amazon S3 Developer Guide.

Type: String

Default: private

Valid Values: private | public-read | public-read-write | authenticated-read | bucket-owner-read | bucket-owner-full-control

http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadInitiate.html

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