Skip to content

Optimize MinIO upload streaming#1

Merged
hequan2017 merged 1 commit into
mainfrom
codex/optimize-entire-project
Feb 4, 2026
Merged

Optimize MinIO upload streaming#1
hequan2017 merged 1 commit into
mainfrom
codex/optimize-entire-project

Conversation

@hequan2017

Copy link
Copy Markdown
Owner

Motivation

  • Reduce memory usage and improve reliability for large uploads by streaming directly from the multipart file and ensuring file handles are closed.

Description

  • Update UploadFile to stream from the multipart.File by passing f to PutObject instead of buffering into a bytes.Buffer.
  • Add defer f.Close() to ensure the uploaded file handle is closed and remove the now-unused in-memory copy and imports.
  • Preserve existing timeout and MIME detection logic and keep bucket creation/initialization behavior unchanged.

Testing

  • No automated tests were run for this change.

Codex Task

@hequan2017
hequan2017 merged commit d59b678 into main Feb 4, 2026
7 of 8 checks passed
@hequan2017
hequan2017 deleted the codex/optimize-entire-project branch February 4, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant