$npx -y skills add googleworkspace/cli --skill gws-drive-uploadGoogle Drive: Upload a file with automatic metadata.
| 1 | # drive +upload |
| 2 | |
| 3 | > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. |
| 4 | |
| 5 | Upload a file with automatic metadata |
| 6 | |
| 7 | ## Usage |
| 8 | |
| 9 | ```bash |
| 10 | gws drive +upload <file> |
| 11 | ``` |
| 12 | |
| 13 | ## Flags |
| 14 | |
| 15 | | Flag | Required | Default | Description | |
| 16 | |------|----------|---------|-------------| |
| 17 | | `<file>` | ✓ | — | Path to file to upload | |
| 18 | | `--parent` | — | — | Parent folder ID | |
| 19 | | `--name` | — | — | Target filename (defaults to source filename) | |
| 20 | |
| 21 | ## Examples |
| 22 | |
| 23 | ```bash |
| 24 | gws drive +upload ./report.pdf |
| 25 | gws drive +upload ./report.pdf --parent FOLDER_ID |
| 26 | gws drive +upload ./data.csv --name 'Sales Data.csv' |
| 27 | ``` |
| 28 | |
| 29 | ## Tips |
| 30 | |
| 31 | - MIME type is detected automatically. |
| 32 | - Filename is inferred from the local path unless --name is given. |
| 33 | |
| 34 | > [!CAUTION] |
| 35 | > This is a **write** command — confirm with the user before executing. |
| 36 | |
| 37 | ## See Also |
| 38 | |
| 39 | - [gws-shared](../gws-shared/SKILL.md) — Global flags and auth |
| 40 | - [gws-drive](../gws-drive/SKILL.md) — All manage files, folders, and shared drives commands |