tangled
alpha
login
or
join now
evan.jarrett.net
/
at-container-registry
66
fork
atom
A container registry that uses the AT Protocol for manifest storage and S3 for blob storage.
atcr.io
docker
container
atproto
go
66
fork
atom
overview
issues
1
pulls
pipelines
fix upload blob to s3
evan.jarrett.net
3 weeks ago
f307d6ea
3085fc72
verified
This commit was signed with the committer's
known signature
.
evan.jarrett.net
SSH Key Fingerprint:
SHA256:bznk0uVPp7XFOl67P0uTM1pCjf2A4ojeP/lsUE7uauQ=
1/2
lint.yaml
success
5min 50s
tests.yml
failed
5min 44s
+6
-4
1 changed file
expand all
collapse all
unified
split
pkg
s3
types.go
+6
-4
pkg/s3/types.go
···
248
248
// PutBytes uploads data to blobPath with the given content type.
249
249
func (s *S3Service) PutBytes(ctx context.Context, blobPath string, data []byte, contentType string) error {
250
250
key := s.s3Key(blobPath)
251
251
+
contentLength := int64(len(data))
251
252
_, err := s.Client.PutObject(ctx, &awss3.PutObjectInput{
252
252
-
Bucket: &s.Bucket,
253
253
-
Key: &key,
254
254
-
Body: bytes.NewReader(data),
255
255
-
ContentType: &contentType,
253
253
+
Bucket: &s.Bucket,
254
254
+
Key: &key,
255
255
+
Body: bytes.NewReader(data),
256
256
+
ContentType: &contentType,
257
257
+
ContentLength: &contentLength,
256
258
})
257
259
return err
258
260
}