我试图使用the KNPLabs gaufrette bundle将图像文件上传到S3。当我调试S3的响应时出现以下错误:尝试使用gaufrette上传到S3时出错
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
images.mynamespace.com.s3.amazonaws.com
我试着将base_url参数设置为该端点,但仍然得到相同的错误。还有其他一些关于建议设置我也试过的区域的问题。
我试图上传到的桶在欧盟西部地区(爱尔兰)。无论我尝试什么配置,gaufrette仍然似乎尝试使用s3.amazonaws.com
如何正确配置gaufrette?
config.yml:
knp_gaufrette:
adapters:
image_storage:
amazon_s3:
amazon_s3_id: mynamespace_admin.amazon_s3
bucket_name: %amazon_s3_bucket_name%
create: false
options:
create: true
directory: 'dirname'
region: eu-west-1
filesystems:
image_storage:
adapter: image_storage
alias: image_storage_filesystem
能否请你分享,你必须设置你的适配器配置文件的一部分?也适用于您必须在适配器选项中传递区域的区域。 – Kapil
@Kapil谢谢。把整个区域端点url解决问题 – codecowboy