MCPcopy
hub / github.com/cortexlabs/cortex / Upload

Method Upload

pkg/async-gateway/storage.go:60–68  ·  view source on GitHub ↗

Upload uploads binary data to S3

(key string, payload io.Reader, contentType string)

Source from the content-addressed store, hash-verified

58
59// Upload uploads binary data to S3
60func (s *s3) Upload(key string, payload io.Reader, contentType string) error {
61 _, err := s.uploader.Upload(&s3manager.UploadInput{
62 Key: aws.String(key),
63 Bucket: aws.String(s.bucket),
64 ContentType: aws.String(contentType),
65 Body: payload,
66 })
67 return err
68}
69
70// Download downloads a file from S3 into memory
71func (s *s3) Download(key string) ([]byte, error) {

Callers

nothing calls this directly

Calls 2

UploadMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected