maton one-drive item upload

maton one-drive item upload <local-file> [flags]

Upload a local file to OneDrive. Files ≤4 MiB go through a single PUT to /root:/path:/content; larger files automatically open an upload session and stream in chunks. The destination path is given by –path and must include the target filename.

Options

--conflict <string>
Conflict behavior: fail, replace, rename
--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 Content-Type
--paginate
Follow next_cursor and concatenate all pages (list commands only)
--path <string>
Destination path including filename (required, e.g. Documents/report.pdf)
-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 one-drive item upload ./report.pdf --path Documents/report.pdf
$ maton one-drive item upload ./data.csv --path Reports/2026/data.csv --conflict replace

See also