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

Setting "Metadata" on S3 adapter #264

Open
arjanfrans opened this issue Mar 18, 2022 · 1 comment
Open

Setting "Metadata" on S3 adapter #264

arjanfrans opened this issue Mar 18, 2022 · 1 comment

Comments

@arjanfrans
Copy link

arjanfrans commented Mar 18, 2022

Question

I am trying to set the 'Metadata' on my S3 adapter. I have tried setting it as a string, since the configuration complains that it should be scalar and not an array, but when the call to the S3 api is made I get the following error:

Found 1 error while validating the input provided for the PutObject operation:
[Metadata] must be an associative array. Found string(56) "Cache-Control: max-age=2592000, public, s-maxage=2592000"
        s3_adapter:
            awss3v3:
                client: Aws\S3\S3Client
                bucket: 'test'
                prefix: 'test'
                options:
                    ACL: 'public-read'
                    Metadata: 'Cache-Control: max-age=2592000, public, s-maxage=2592000'

When setting it as an array, it complains about the type:

    Metadata: 
          'Cache-Control': 'max-age=2592000, public, s-maxage=2592000'
  Invalid type for path "oneup_flysystem.adapters.s3_adapter.awss3v3.options.Metadata". Expected "scalar", but got "array".

How do I configure the metadata correctly? I am suspecting that the type is wrong; it shouldn't be a scalar.

@stale stale bot added the stale label Jun 4, 2022
@arjanfrans
Copy link
Author

This is still an issue.

@stale stale bot removed the stale label Jun 4, 2022
@1up-lab 1up-lab deleted a comment from stale bot Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants