distribution/registry/storage/driver/s3-aws/s3_32bit.go
Chen Qi 6970080b10 s3-aws: fix build for 386
When building for 386, we got the following build error:

  registry/storage/driver/s3-aws/s3.go:312:99: cannot use
  maxChunkSize (untyped int constant 5368709120) as int value
  in argument to getParameterAsInteger (overflows)

This is because the s3_64bit.go is used. Adjust the build tag matching
in s3_32bit.go and s3_64bit.go to fix this issue.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2025-05-29 11:35:59 +08:00

11 lines
254 B
Go

//go:build arm || 386
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