mirror of
https://github.com/distribution/distribution.git
synced 2025-07-17 08:53:54 +00:00
Some S3 compatible object storage systems like R2 require that all multipart chunks are the same size. This was mostly true before, except the final chunk was larger than the requested chunk size which causes uploads to fail. In addition, the two byte slices have been replaced with a single *bytes.Buffer and the surrounding code simplified significantly. Fixes: #3873 Signed-off-by: Thomas Way <thomas@6f.io>
11 lines
247 B
Go
11 lines
247 B
Go
//go:build arm
|
|
|
|
package s3
|
|
|
|
import "math"
|
|
|
|
// maxChunkSize defines the maximum multipart upload chunk size allowed by S3.
|
|
// S3 API requires max upload chunk to be 5GB, but this overflows on 32-bit
|
|
// platforms.
|
|
const maxChunkSize = math.MaxInt32
|