Skip to content

Commit

Permalink
Adds json mimetype.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Leduc-Hamel committed Mar 3, 2021
1 parent 315f2a9 commit 12116e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/store/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ func (s *S3) Persist(ctx context.Context, timestamp int64, name string, id strin

s.cfg.Logger().Debug().Msgf("Persisting %s", key)
_, err := s.client.PutObjectWithContext(ctx, &s3.PutObjectInput{
Bucket: aws.String(s.cfg.S3Bucket()),
Key: aws.String(key),
Body: strings.NewReader(fmt.Sprintf("%v", data)),
Bucket: aws.String(s.cfg.S3Bucket()),
Key: aws.String(key),
Body: strings.NewReader(fmt.Sprintf("%v", data)),
ContentType: aws.String("application/json"),
})
if err != nil {
s.cfg.Logger().Error().Err(err).Msgf("Persisting %s: Failed", key)
Expand Down

0 comments on commit 12116e9

Please sign in to comment.