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

Method UploadFileToS3

pkg/lib/aws/s3.go:414–421  ·  view source on GitHub ↗
(path string, bucket string, key string)

Source from the content-addressed store, hash-verified

412}
413
414func (c *Client) UploadFileToS3(path string, bucket string, key string) error {
415 file, err := files.Open(path)
416 if err != nil {
417 return err
418 }
419 defer file.Close()
420 return c.UploadReaderToS3(file, bucket, key)
421}
422
423func (c *Client) UploadBytesToS3(data []byte, bucket string, key string) error {
424 return c.UploadReaderToS3(bytes.NewReader(data), bucket, key)

Callers 1

UploadDirToS3Method · 0.95

Calls 2

UploadReaderToS3Method · 0.95
OpenFunction · 0.92

Tested by

no test coverage detected