maton google-drive file upload

maton google-drive file upload <file> [flags]

Upload a local file to Drive. Files above 5 MiB automatically use a chunked resumable session that survives transient network errors; smaller files use a single multipart POST. MIME type is detected from the extension; pass –parent to drop the file inside a specific folder, –name to override the destination filename (defaults to the source filename). Pass –no-metadata to skip the metadata part entirely — Drive creates the file with no name and no parent.

Options

--connection <string>
Connection ID to route through (Maton-Connection header)
--dry-run
Print the request that would be sent without executing it
-q, --jq <expression>
Filter JSON output using a jq expression
--json
Output raw JSON
--mime-type <string>
Override the detected MIME type
--name <string>
Target filename in Drive (defaults to source filename)
--no-metadata
Send only file bytes (uploadType=media); Drive creates the file with no name and no parent. Conflicts with --name/--parent
--paginate
Follow next_cursor and concatenate all pages (list commands only)
--parent <string>
Parent folder ID
--supports-all-drives
Set when uploading to a shared drive
-t, --template <string>
Format JSON output using a Go template; see "maton help formatting"

Options inherited from parent commands

-p, --profile <string>
Profile to use for this invocation (overrides the active profile; also reads MATON_PROFILE)

Examples

$ maton google-drive file upload ./report.pdf
$ maton google-drive file upload ./report.pdf --parent 1FoLd...
$ maton google-drive file upload ./data.csv --name 'Sales Data.csv'
$ maton google-drive file upload ./blob.bin --no-metadata

See also