wasabi.com S3兼容的KnpGaufretteBundle

时间:2018-06-15 09:11:37

标签: amazon-s3 symfony4 vichuploaderbundle gaufrette

我想要连接 - wasabi.com S3与KnpGaufretteBundle兼容我没有看到芥末的适配器,但它的S3兼容

我的配置

knp_gaufrette:
    stream_wrapper: ~
    filesystems:
        product_local_fs:
            adapter: product_local
        product_wasabi_fs:
            adapter: product_wasabi
    adapters:
        product_local:
            local:
                directory: '%kernel.project_dir%/public/products'
        product_wasabi:
            aws_s3:
                service_id: 'app_files_s3_wasabi'
                bucket_name: 'my-network'
                detect_content_type: true
                options:
                    directory: 'my-network'

vich_uploader:
    db_driver: orm
    storage: gaufrette
    mappings:
        products:
            uri_prefix: https://s3.wasabisys.com/my-network
            upload_destination: product_wasabi_fs
            namer: vich_uploader.namer_uniqid
            delete_on_remove: true
            delete_on_update: true
        products_local:
            uri_prefix: /products
            upload_destination: product_local_fs
            delete_on_remove: true
            delete_on_update: true

服务:

app_files_s3_wasabi:
    class: Aws\S3\S3Client
    factory: [Aws\S3\S3Client, 'factory']
    arguments:
      -
        version: latest
        region: ""
        credentials:
            key: '%env(wasabi_access_key)%'
            secret: '%env(wasabi_secret_key)%'

my-network - 已注册存在桶, 我转储连接细节:

vendor / guzzlehttp / psr7 / src / Request.php Line:101

Uri {#27076 ▼
  -scheme: "https"
  -userInfo: ""
  -host: "s3..amazonaws.com"
  -port: null
  -path: "/my-network"
  -query: ""
  -fragment: ""

任何想法如何正确连接到wasabi.com?

更新1

i get info from wasabi - https://wasabi-support.zendesk.com/hc/en-us/articles/360000363572-How-do-I-use-the-AWS-SDK-for-PHP-with-Wasabi-
$s3Client = S3Client::factory(array(
'endpoint' => 'http://s3.wasabisys.com',
'profile' => 'wasabi',
'region' => 'us-east-1',
'version' => 'latest',
));
//Sample to create a bucket
$s3Client->createBucket(array('Bucket' => ''));

那么如何在适配器中设置端点?

0 个答案:

没有答案