Skip to content

feat(cli): add --upload size limits, empty-upload guard, deduplication, and lazy uploads - #273

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara/1036217723
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara/1036217723

Conversation

@copybara-service

Copy link
Copy Markdown

feat(cli): add --upload size limits, empty-upload guard, deduplication, and lazy uploads

  • Enforce Files API per-file size limits (50 MB for PDF/Office/OpenDocument,
    2 GB for other files including CSV) before sending any request.
  • Reject --upload with a usage error when no input is a local media or document
    file (e.g., only files/, YouTube URLs, or text files).
  • Defer local media uploads to block() and cache uploaded blocks by path and
    MIME type so repeated --input paths upload once and multi-input transcribe
    uploads each file sequentially on its turn.
  • Add contract tests in upload_safeguards_test.go covering size limits,
    nothing-to-upload rejection, repeated-path deduplication, and sequential
    transcribe uploads.

@copybara-service
copybara-service Bot requested a review from a team December 4, 2026 12:31
…n, and lazy uploads

- Enforce Files API per-file size limits (50 MB for PDF/Office/OpenDocument,
  2 GB for other files including CSV) before sending any request.
- Reject --upload with a usage error when no input is a local media or document
  file (e.g., only files/<id>, YouTube URLs, or text files).
- Defer local media uploads to block() and cache uploaded blocks by path and
  MIME type so repeated --input paths upload once and multi-input transcribe
  uploads each file sequentially on its turn.
- Add contract tests in upload_safeguards_test.go covering size limits,
  nothing-to-upload rejection, repeated-path deduplication, and sequential
  transcribe uploads.

PiperOrigin-RevId: 1036217723
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants