Skip to main content

Module upload

Module upload 

Source
Expand description

Drive content upload — creates a new file from local content (issue #1574, ADR-0071).

Structurally identical to create.rs (single-target, rename.rs’s linear-function shape, not file_move.rs’s batch Plan/Execute) — the only difference is the mutating call itself (FilesApi::upload’s multipart request instead of FilesApi::create’s plain JSON body). The local-file size check happens in the CLI layer, before UploadOptions is even constructed, so it fires identically whether or not --dry-run is set — by the time this module sees content, it’s already known to fit.

Structs§

UploadOptions
Per-call upload options.
UploadOutcome
The planned (and, after a real run, final) outcome of one upload call.

Enums§

UploadResult
What happened (or, under --dry-run, would happen).

Functions§

upload
Uploads opts.content as opts.name inside opts.parent_folder_id, gated by rules. See the module doc for why there is no separate upload-side size check here — the caller already did it.