GoogleCloudPlatform/appengine-gcs-client

copy2() resets content-type to binary/octet-stream if metadata is set

Opened this issue · 1 comments

A file copied with copy2 (is there a copy1?) resets the content-type to binary/octet-stream on the destination file if the file is copied. The documentation does not specify that the metadata should contain the content-type (or how it could contain a content-type), and content-type is also a separate parameter using open(), so the expectation is that the content-type should be copied with such a call:

copy2(src, dst, {'x-goog-acl': 'public-read'})

Please provide at least documentation of how to copy the content type, or set it, or that it is removed.

Upvote on this being done!!