change cache control for thumbnails

This commit is contained in:
Niko Storni 2019-11-11 15:11:34 -05:00
parent 25e49f8ff2
commit d520ff2c68

View file

@ -61,11 +61,12 @@ func (u *thumbnailUploader) uploadThumbnail() error {
uploader := s3manager.NewUploader(s3Session) uploader := s3manager.NewUploader(s3Session)
_, err = uploader.Upload(&s3manager.UploadInput{ _, err = uploader.Upload(&s3manager.UploadInput{
Bucket: aws.String("thumbnails.lbry.com"), Bucket: aws.String("thumbnails.lbry.com"),
Key: key, Key: key,
Body: thumb, Body: thumb,
ACL: aws.String("public-read"), ACL: aws.String("public-read"),
ContentType: aws.String("image/jpeg"), ContentType: aws.String("image/jpeg"),
CacheControl: aws.String("public, max-age=2592000"),
}) })
u.mirroredUrl = ThumbnailEndpoint + u.name u.mirroredUrl = ThumbnailEndpoint + u.name
return errors.Err(err) return errors.Err(err)