Commit Graph

2 Commits

Author SHA1 Message Date
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
Thomas Way
5ee5aaa058
fix(registry/storage/driver/s3-aws): use a consistent multipart chunk size
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>
2024-10-30 21:46:36 +00:00