From 9c0a9452a72761a7113e0fdcd9d539b7c5e7635c Mon Sep 17 00:00:00 2001 From: cedricve Date: Fri, 26 Jun 2026 11:48:47 +0000 Subject: [PATCH] Increase default TUS chunk size from 1 MiB to 8 MiB to meet S3 multipart minimum part size requirements --- machinery/src/cloud/tus_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machinery/src/cloud/tus_client.go b/machinery/src/cloud/tus_client.go index faa2903..a5540a4 100644 --- a/machinery/src/cloud/tus_client.go +++ b/machinery/src/cloud/tus_client.go @@ -46,12 +46,12 @@ func resumableUploadsEnabled() bool { // explicit size is configured. Splitting the upload into chunks keeps each HTTP // request small enough for intermediary proxies/load balancers and checkpoints // progress frequently, so an interruption resumes with minimal re-upload. -const tusDefaultChunkSize int64 = 1 << 20 // 1 MiB +const tusDefaultChunkSize int64 = 8 << 20 // 8 MiB (>= S3 multipart minimum part size) const tusProgressBucketPercent int64 = 10 // tusChunkSize returns the number of bytes to send per PATCH request. It -// defaults to tusDefaultChunkSize (1 MiB) and can be overridden with the +// defaults to tusDefaultChunkSize (8 MiB) and can be overridden with the // AGENT_TUS_CHUNK_SIZE_BYTES environment variable. A value of 0 (or negative) // disables chunking and sends the remaining bytes in a single PATCH. func tusChunkSize() int64 {