Skip to content

fix(oss): change default expire ttl and sign param to adapt SDK v2#2979

Merged
HFO4 merged 2 commits intocloudreve:masterfrom
YUDONGLING:fix-oss-sdk-v2-20251016.2
Oct 16, 2025
Merged

fix(oss): change default expire ttl and sign param to adapt SDK v2#2979
HFO4 merged 2 commits intocloudreve:masterfrom
YUDONGLING:fix-oss-sdk-v2-20251016.2

Conversation

@YUDONGLING
Copy link
Copy Markdown
Member

No description provided.

query.Del("x-oss-signature-version")
query.Del("response-content-disposition")
query.Del(trafficLimitHeader)
// 阿里云 OSS 已支持在公有空间使用限速下载,使用公有空间时可以在 iOS / iPad 客户端等内置下载时实现限速
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this comment. It should be in the PR description, instead of putting in the code.

query.Del(trafficLimitHeader)
// 阿里云 OSS 已支持在公有空间使用限速下载,使用公有空间时可以在 iOS / iPad 客户端等内置下载时实现限速
// https://help.aliyun.com/zh/oss/single-connection-bandwidth-throttling-4#section-zka-umg-7dx
// query.Del(trafficLimitHeader)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this completly since traffic limit is supported.


func (handler *Driver) signSourceURL(ctx context.Context, path string, expire *time.Time, req *oss.GetObjectRequest, forceSign bool) (string, error) {
ttl := time.Duration(24) * time.Hour * 365 * 20
ttl := time.Duration(24) * time.Hour * 7 // V4 Sign 最大过期时间为7天
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HFO4
Copy link
Copy Markdown
Member

HFO4 commented Oct 16, 2025

BTW, have you tested the new changes under public OSS bucket?

@YUDONGLING
Copy link
Copy Markdown
Member Author

YUDONGLING commented Oct 16, 2025

BTW, have you tested the new changes under public OSS bucket?

See https://help.aliyun.com/zh/oss/single-connection-bandwidth-throttling-4#section-zka-umg-7dx. I will update the docs later.

@HFO4
Copy link
Copy Markdown
Member

HFO4 commented Oct 16, 2025

BTW, have you tested the new changes under public OSS bucket?

See https://help.aliyun.com/zh/oss/single-connection-bandwidth-throttling-4#section-zka-umg-7dx. I will update the docs later.

Yeah I know, just want to confirm that you've tested it so I don't need to do it again.

@YUDONGLING
Copy link
Copy Markdown
Member Author

BTW, have you tested the new changes under public OSS bucket?

See https://help.aliyun.com/zh/oss/single-connection-bandwidth-throttling-4#section-zka-umg-7dx. I will update the docs later.

Yeah I know, just want to confirm that you've tested it so I don't need to do it again.

Tested, it works.

@HFO4
Copy link
Copy Markdown
Member

HFO4 commented Oct 16, 2025

Great, thanks!

@HFO4 HFO4 merged commit 6bd30a8 into cloudreve:master Oct 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants