Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasabi.com S3-compatible #188

Open
grekpg opened this issue Jun 15, 2018 · 2 comments
Open

wasabi.com S3-compatible #188

grekpg opened this issue Jun 15, 2018 · 2 comments
Assignees

Comments

@grekpg
Copy link

grekpg commented Jun 15, 2018

I want connect - wasabi.com S3-compatible to KnpGaufretteBundle i dont see adapter for wasabi, but its S3-compatible

my config

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

services :

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 - is registered exist bucket, i dump connection details :

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

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

any idea how correctly connect to wasabi.com ?

@grekpg grekpg changed the title wasabi.com S3-compatible KnpGaufretteBundle wasabi.com S3-compatible Jun 15, 2018
@RichardHerold
Copy link

I'm the Senior PM for Wasabi. Wasabi should work with the adaptor as long as you can modify the endpoint in the PHP like our example in our KB:

https://wasabi-support.zendesk.com/hc/en-us/articles/360000363572-How-do-I-use-the-AWS-SDK-for-PHP-with-Wasabi-

@grekpg
Copy link
Author

grekpg commented Jun 25, 2018

services:
app_files_s3_wasabi:
class: Aws\S3\S3Client
factory: [Aws\S3\S3Client, 'factory']
arguments:
-
endpoint: 'https://s3.wasabisys.com'
version: latest
region: "us-east-1"
credentials:
key: '%env(wasabi_access_key)%'
secret: '%env(wasabi_secret_key)%'

config:
product_wasabi:
aws_s3:
service_id: 'app_files_s3_wasabi'
bucket_name: '123123-test'
detect_content_type: true

but i get

The configured bucket "123123-test" does not exist.

when i connect directtly form S3Client

$s3Client = S3Client::factory(array(
'endpoint' => 'http://s3.wasabisys.com',
'profile' => 'default',
'region' => 'us-east-1',
'version' => 'latest',
));

$bucket = '123123-test';

$s3Client->doesBucketExist(array('Bucket' => $bucket ));
give true

@PedroTroller PedroTroller self-assigned this Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants