Upload uploads binary data to S3
(key string, payload io.Reader, contentType string)
| 58 | |
| 59 | // Upload uploads binary data to S3 |
| 60 | func (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 |
| 71 | func (s *s3) Download(key string) ([]byte, error) { |