Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staging put: stream file uploads instead of loading all to memory #197

Merged
merged 1 commit into from
Apr 9, 2024

Commits on Mar 28, 2024

  1. staging put: stream file uploads instead of loading all to memory

    os.ReadFile reads all of the content of the file into a byte array in
    memory, which can cause memory consumption pressure for users. Instead,
    an os.File instance is itself a byte reader, and we can provide the file
    directly to http.NewRequest so it can read the file in chunks and upload
    it as a stream, thus not holding the whole file in memory.
    mdibaiee committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    6e608ad View commit details
    Browse the repository at this point in the history