Skip to content

Commit

Permalink
Merge pull request #231 from deploymenttheory/dev-multipartfix
Browse files Browse the repository at this point in the history
Refactor chunk size for file upload in multipart request to 64MB for …
  • Loading branch information
ShocOne authored Jun 6, 2024
2 parents c0f610e + e493fc6 commit 2d0fb0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httpclient/multipartrequestwithretry.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func setFormDataPartHeader(fieldname, filename, contentType string, customHeader
//
// chunkFileUpload reads the file upload into chunks and writes it to the writer.
func chunkFileUpload(file *os.File, writer io.Writer, log logger.Logger, updateProgress func(int64), uploadState *UploadState) error {
const chunkSize = 1024 * 65536 // 1024 bytes * 65536 (64 MB)
const chunkSize = 65536 * 1024 // 65536 * 1024 bytes (64 MB)
buffer := make([]byte, chunkSize)
totalWritten := int64(0)
chunkWritten := int64(0)
Expand Down

0 comments on commit 2d0fb0f

Please sign in to comment.