Skip to content

Commit 8cb6ba5

Browse files
committed
chore: pre-signed expiry time
1 parent ccc10ca commit 8cb6ba5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/internal/handlers/s3bucket/service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import (
55
"github.com/aws/aws-sdk-go-v2/aws"
66
"github.com/aws/aws-sdk-go-v2/service/s3"
77
"github.com/google/uuid"
8+
"time"
89
)
910

1011
func (s *Service) GetPresignedUrl(inputs *GetParams) (*DownloadUrl, error) {
1112

1213
req, err := s.Presigner.PresignGetObject(context.Background(), &s3.GetObjectInput{
1314
Bucket: aws.String(inputs.Bucket),
1415
Key: aws.String(inputs.Key),
15-
})
16+
}, s3.WithPresignExpires(time.Hour*24*30))
1617
if err != nil {
1718
return nil, err
1819
}

0 commit comments

Comments
 (0)