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

Allow specifying custom metadata when uploading Google Cloud Storage files #656

Open
jannisy opened this issue May 16, 2024 · 2 comments
Open

Comments

@jannisy
Copy link

jannisy commented May 16, 2024

The resumableUpload in the Google Cloud Storage connector allows specifying metadata of type Map[String, String] which are added to the uploaded file.
As per the GCS documentation, metadata properties like contentType or cacheControl are predefined by GCS.

However, there is also custom metadata, which is arbitrary user-provided key-value pairs. They are sent in the HttpRequest in the same way, but the value is not a string but a json object:

{
    // metadata
    "contentType": "...",
    // custom metadata
    "metadata": {
        "customKey": "customData"
    }
}

However this cannot be modelled currently because metadata is Map[String, String] - the value needs to be specified as Map[String, String] instead of String to handle this.

(According to the documentatoin, GCS should also allow the notation metadata.customKey = customData but this did not work for me when I tried)

@pjfanning
Copy link
Contributor

If the GCS docs say that metadata.customKey is a valid key, I think we really need to track down why that doesn't work.

It is not trivial for us to change the connector to modify the metadata support.

@jannisy
Copy link
Author

jannisy commented May 16, 2024

Yes, makes sense. I will check again if I can find out what's the issue.

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

2 participants