Skip to content

microvms: add UploadFile and DownloadFile - #1191

Merged
SSharma-10 merged 3 commits into
mainfrom
ksingh/microvms-file-transfer
Oct 23, 2026
Merged

SSharma-10 merged 3 commits into
mainfrom
ksingh/microvms-file-transfer

Conversation

@kishlay-singh-DO

Copy link
Copy Markdown
Contributor
  • UploadFile streams a raw body with Content-Length (the API refuses chunked bodies), optional mode, uid/gid (together), and sha256 for server-side verification; returns MicroVMFileInfo.
  • DownloadFile returns a streaming body that verifies the content against X-Checksum-Sha256 as it is read (ErrMicroVMFileChecksum in place of io.EOF on mismatch), plus SizeBytes and SHA256.

kishlay-singh-DO and others added 2 commits October 22, 2026 18:08
PUT/GET /v2/microvms/{id}/files (single-file transfer through the guest
agent, feature gate file_transfer):

- UploadFile streams a raw body with Content-Length (the API refuses
  chunked bodies), optional mode, uid/gid (together), and sha256 for
  server-side verification; returns MicroVMFileInfo.
- DownloadFile returns a streaming body that verifies the content
  against X-Checksum-Sha256 as it is read (ErrMicroVMFileChecksum in
  place of io.EOF on mismatch), plus SizeBytes and SHA256.

Co-authored-by: Cursor <cursoragent@cursor.com>

@SSharma-10 SSharma-10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SSharma-10
SSharma-10 merged commit 4ab4c57 into main Oct 23, 2026
8 checks passed
@SSharma-10
SSharma-10 deleted the ksingh/microvms-file-transfer branch October 23, 2026 13:41
@SSharma-10 SSharma-10 mentioned this pull request Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址