Skip to content

Fix Google Cloud Storage object metadata handling#232

Open
tanelmae wants to merge 1 commit into
WasabiAiR:masterfrom
tanelmae:master
Open

Fix Google Cloud Storage object metadata handling#232
tanelmae wants to merge 1 commit into
WasabiAiR:masterfrom
tanelmae:master

Conversation

@tanelmae
Copy link
Copy Markdown

Google Cloud Storage object has fixed and user-defined metadata.
Fixed metadata:

  • Access control metadata
  • Cache-Control
  • Content-Disposition
  • Content-Encoding
  • Content-Language
  • Content-Type

Currently item.Metadata() would only return map of user defined metadata (often just means an empty map). Fixed metadata are fields of storage.Object and would be missing in item metadata. For an example there would be no way of knowing the object content type.

This change will provide also "fixed metadata" from the stow item metadata map and allows setting them when writing. In addition to tests in this repo I have tries these changes out in my own project.

Let me know if something about this could be improved!

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

Successfully merging this pull request may close these issues.

1 participant