Skip to content

Commit 2d0fb0f

Browse files
authored
Merge pull request #231 from deploymenttheory/dev-multipartfix
Refactor chunk size for file upload in multipart request to 64MB for …
2 parents c0f610e + e493fc6 commit 2d0fb0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httpclient/multipartrequestwithretry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ func setFormDataPartHeader(fieldname, filename, contentType string, customHeader
309309
//
310310
// chunkFileUpload reads the file upload into chunks and writes it to the writer.
311311
func chunkFileUpload(file *os.File, writer io.Writer, log logger.Logger, updateProgress func(int64), uploadState *UploadState) error {
312-
const chunkSize = 1024 * 65536 // 1024 bytes * 65536 (64 MB)
312+
const chunkSize = 65536 * 1024 // 65536 * 1024 bytes (64 MB)
313313
buffer := make([]byte, chunkSize)
314314
totalWritten := int64(0)
315315
chunkWritten := int64(0)

0 commit comments

Comments
 (0)