我可以将Image上传到s3存储桶 . 然后我检索包含图像链接的JSON对象 . 这是指向存储桶的URL .
网址:“https://s3.amazonaws.com/bucket-name/uploads/recepie/image/21/2013-12-13_23.25.58.jpg”
当我按它时,我收到一个错误
<Error>
<Code>PermanentRedirect</Code>
<Message>
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
</Message>
<RequestId>2227C463FE87702A</RequestId>
<Bucket>bucket-name</Bucket>
<HostId>
20obskM************FmRoYcMDnMlH
</HostId>
<Endpoint>bucket-name.s3.amazonaws.com</Endpoint>
</Error>
我正在使用带载波和雾宝石的RoR .
3 回答
请使用此代码;
http://your_bucket_name.s3.amazonaws.com/image_path
如:
http://your_bucket_name.s3.amazonaws.com/uploads/recepie/image/21/2013-12-13_23.25.58.jpg
试试这个,我面临同样的问题并通过以下方式解决:
我必须替换follow并在 endpoints 中指定我的bucket区域:
有: