Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
staging put: stream file uploads instead of loading all to memory (#197)
`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.
- Loading branch information