0

我目前正在使用 vich_uploader 将文件上传到 S3(这工作正常)。但是现在我也想应用一些 liip_imagine filter_sets,当前的 config.yml 看起来像:

liip_imagine:
    loaders:
        loader_aws_s3_images:
            flysystem:
                filesystem_service: oneup_flysystem.awss3v3_filesystem
    resolvers:
        profile_photos:
            flysystem:
                filesystem_service: oneup_flysystem.awss3v3_filesystem
                root_url:           "%s3_directory%"
                cache_prefix:       media/cache
                visibility:         public
    filter_sets:
        cache: ~
        179x151:
            filters:
                thumbnail: { size: [179, 151], mode: inset }
        50x50:
            filters:
                thumbnail: { size: [50, 50], mode: inset }
oneup_flysystem:
    adapters:
        upload_adapter:
            awss3v3:                  
                client: ct_file_store.s3 #this needs to match the "service" you defined above
                # service_id: client.s3
                bucket: %aws_s3_bucket%
                prefix: ~
    filesystems:
        awss3v3:
            adapter:    upload_adapter
            mount:   prefix

vich_uploader:
    db_driver: orm 
    storage:   flysystem
    mappings:
        profile_pics:
            # uri_prefix: https://s3.eu-central-1.amazonaws.com/%aws_s3_bucket% # you'll need this set to use the Vich URL generator
            upload_destination: prefix
            # upload_destination: %kernel.root_dir%/../web/images/profile_pics
            namer: vich_uploader.namer_uniqid
            delete_on_remove: true
            delete_on_update: true
        project_docs:
            # uri_prefix: https://s3.eu-central-1.amazonaws.com/%aws_s3_bucket% # you'll need this set to use the Vich URL generator
            upload_destination: prefix
            # upload_destination: %kernel.root_dir%/../web/images/profile_pics
            namer: vich_uploader.namer_uniqid
            delete_on_remove: true
            delete_on_update: true

作曲家.json:

"liip/imagine-bundle": "@stable",
"aws/aws-sdk-php": "@stable",
"oneup/flysystem-bundle": "@stable",
"league/flysystem-aws-s3-v3": "@stable"

目前我得到一个Source image could not be found我试图创建自定义解析器/加载器以从 S3 读取但没有成功。

4

0 回答 0