Skip to content

Commit 9fba16b

Browse files
chore: release versions
1 parent dc561e0 commit 9fba16b

File tree

5 files changed

+35
-33
lines changed

5 files changed

+35
-33
lines changed

.changeset/upload-content-type.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# @googleworkspace/cli
22

3+
## 0.14.0
4+
5+
### Minor Changes
6+
7+
- dc561e0: Add `--upload-content-type` flag and smart MIME inference for multipart uploads
8+
9+
Previously, multipart uploads used the metadata `mimeType` field for both the Drive
10+
metadata and the media part's `Content-Type` header. This made it impossible to upload
11+
a file in one format (e.g. Markdown) and have Drive convert it to another (e.g. Google Docs),
12+
because the media `Content-Type` and the target `mimeType` must differ for import conversions.
13+
14+
The new `--upload-content-type` flag allows setting the media `Content-Type` explicitly.
15+
When omitted, the media type is now inferred from the file extension before falling back
16+
to the metadata `mimeType`. This matches Google Drive's model where metadata `mimeType`
17+
is the _target_ type (what the file should become) while the media `Content-Type` is the
18+
_source_ type (what the bytes are).
19+
20+
This means import conversions now work automatically:
21+
22+
```bash
23+
# Extension inference detects text/markdown → conversion just works
24+
gws drive files create \
25+
--json '{"name":"My Doc","mimeType":"application/vnd.google-apps.document"}' \
26+
--upload notes.md
27+
28+
# Explicit flag still available as an override
29+
gws drive files create \
30+
--json '{"name":"My Doc","mimeType":"application/vnd.google-apps.document"}' \
31+
--upload notes.md \
32+
--upload-content-type text/markdown
33+
```
34+
335
## 0.13.3
436

537
### Patch Changes

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
[package]
1616
name = "gws"
17-
version = "0.13.3"
17+
version = "0.14.0"
1818
edition = "2021"
1919
description = "Google Workspace CLI — dynamic command surface from Discovery Service"
2020
license = "Apache-2.0"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@googleworkspace/cli",
3-
"version": "0.13.3",
3+
"version": "0.14.0",
44
"private": true,
55
"description": "Google Workspace CLI — dynamic command surface from Discovery Service",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)