我想让我的Symfony2项目中运行LiipImagine,使用KnpGraufette Bundle来访问我的亚马逊AWS S3帐户。Symfony2与KnpGaufrette与S3与LiipImagine
现在我已经可以访问S3,存储和加载数据和所有。 我可以使用LiipImagine来过滤本地图像。 目前为止这么好。
现在我使用下面的配置将我的gaufrette/s3服务和本教程中显示的LiipImagine ans粘合在一起。
services:
amazonS3:
class: AmazonS3
arguments:
options:
key: '%aws_key%'
secret: '%aws_secret_key%'
certificate_authority: '%kernel.root_dir%/config/cacert.pem'
gaufrette.amazonS3_adapter:
class: Gaufrette\Adapter\AmazonS3
arguments:
service: '@amazonS3'
bucket_name: '%aws_bucketname%'
gaufrette.amazonS3.fileSystemService:
class: Gaufrette\Filesystem
arguments:
adapter: '@gaufrette.amazonS3_adapter'
our.fs.dataloader.s3:
class: Liip\ImagineBundle\Imagine\Data\Loader\FileSystemLoader
arguments:
- "@liip_imagine"
- "@gaufrette.amazonS3.fileSystemService"
tags:
- { name: 'liip_imagine.data.loader', loader: 'gaufrette.amazonS3.fileSystemService' }
liip_imagine:
filter_sets:
s3_clientsbar:
data_loader: 'our.fs.dataloader.s3'
filters:
thumbnail: { size: [50, 50], mode: outbound, allow_upscale: true }
当使用LiipImagine来筛选S3林资源,我得到以下错误:
ErrorException: Catchable Fatal Error: Argument 2 passed to Liip\ImagineBundle\Imagine\Data\Loader\FileSystemLoader::__construct() must be an array, object given, called in
测试我的过滤代码是这样的:
$imagemanagerResponse = $this->container->get('liip_imagine.controller')->filterAction($this->getRequest(),'the-actual-existing-loadable-aws-id' , 's3_clientsbar');
再说:可能有的主持人添加标签Gaufrette,KnpGaufrette或KnpGaufretteBundle?
您是否曾经解决过这个问题?你怎么做的? – turibe
不,我无法访问此项目: -/ –