Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: update presign expires

Stevencf7718f8dc98
diff --git a/plugin/storage/s3/s3.go b/plugin/storage/s3/s3.go
index a8c6a3b5c..06793a35f 100644
--- a/plugin/storage/s3/s3.go
+++ b/plugin/storage/s3/s3.go
@@ -70,7 +70,9 @@ func (c *Client) PresignGetObject(ctx context.Context, key string) (string, erro
Bucket: aws.String(*c.Bucket),
Key: aws.String(key),
}, func(opts *s3.PresignOptions) {
- opts.Expires = time.Duration(7 * 24 * time.Hour)
+ // Set the expiration time of the presigned URL to 5 days.
+ // Reference: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html
+ opts.Expires = time.Duration(5 * 24 * time.Hour)
})
if err != nil {
return "", errors.Wrap(err, "failed to presign put object")