我有一个流包装器配置为使用 Gaufrette 与 amazon s3 一起工作bundle 来管理文件系统。我可以使用 assetic 成功转储 Assets ,我当前的配置如下:
knp_gaufrette:
adapters:
amazon:
amazon_s3:
amazon_s3_id: site_store.s3
bucket_name: %site_store.bucket_name%
create: true
filesystems:
amazon:
adapter: amazon
stream_wrapper:
protocol: s3
filesystems:
- amazon
assetic:
read_from: %cdn_path_prod%
write_to: %cdn_path_prod%
和我的参数:
cdn_url_prod: "http://images.site.com/"
cdn_path_prod: "s3://amazon"
我能够执行 app/console assetic:dump --env=dev。然后它将 Assets 成功上传到我的 s3 存储桶。但是,当我尝试通过执行以下操作对 Assets 安装执行相同操作时:
app/console assets:install s3://amazon
它给我这个错误:
[InvalidArgumentException]
The specified path (s3://amazon) is invalid.
我查看了网络,有人能够按照他的描述做到这一点 here .我的 Steam 包装机出了什么问题?
最佳答案
您确定注册了任何流包装器来处理“s3://”方案吗?
在https://github.com/Cybernox/AmazonWebServicesBundle/blob/master/Resources/doc/cdn.md#dump-assets-to-the-s3-bucket ,您将看到他们如何注册流包装器以便能够将 Assets 转储到“s3://”目标。
关于php - 应用程序/控制台 Assets :install to S3 using stream wrapper errors,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16097361/