GoogleCloudPlatform / GoogleCloudPlatform/gsutil
gsutil setmeta claims it would *remove* attributes but sets them to an empty string
- Dominant language
- Python
- Stars
- 918
- Forks
- 335
- PR merge metrics
- No merged PRs in 30d
Description
Today I tried to clear the `Content-Disposition` metadata with `gsutil -m setmeta -h "Content-Disposition" 'gs://my_bucket/*'`. Even though the [documentation](https://cloud.google.com/storage/docs/gsutil/commands/setmeta) claims it would *remove* attributes, it just sets them to an empty string. (It calls the [patch endpoint](https://cloud.google.com/storage/docs/json_api/v1/objects/patch) which cannot remove attributes, afaics.)
This is a problem for us, because we have a bucket with lots of files with `Content-Disposition` headers we want to clear. The reason for that is, that we want to allow the content disposition to be set via `File.getSignedUrl`, but as the documentation states, a `Content-Disposition` attribute in the object's metadata takes precedence. And an *empty* `Content-Disposition` attribute is not the same as a non-existing `Content-Disposition` attribute, apparently.
Contributor guide
Assessment
This issue has not been assessed yet.