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

Fix Google Cloud Storage object metadata handling #232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tanelmae
Copy link

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.

None yet

1 participant