fix(oss): change default expire ttl and sign param to adapt SDK v2#2979
fix(oss): change default expire ttl and sign param to adapt SDK v2#2979HFO4 merged 2 commits intocloudreve:masterfrom
Conversation
pkg/filemanager/driver/oss/oss.go
Outdated
| query.Del("x-oss-signature-version") | ||
| query.Del("response-content-disposition") | ||
| query.Del(trafficLimitHeader) | ||
| // 阿里云 OSS 已支持在公有空间使用限速下载,使用公有空间时可以在 iOS / iPad 客户端等内置下载时实现限速 |
There was a problem hiding this comment.
Please remove this comment. It should be in the PR description, instead of putting in the code.
pkg/filemanager/driver/oss/oss.go
Outdated
| query.Del(trafficLimitHeader) | ||
| // 阿里云 OSS 已支持在公有空间使用限速下载,使用公有空间时可以在 iOS / iPad 客户端等内置下载时实现限速 | ||
| // https://help.aliyun.com/zh/oss/single-connection-bandwidth-throttling-4#section-zka-umg-7dx | ||
| // query.Del(trafficLimitHeader) |
There was a problem hiding this comment.
We can remove this completly since traffic limit is supported.
pkg/filemanager/driver/oss/oss.go
Outdated
|
|
||
| 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天 |
There was a problem hiding this comment.
|
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. |
|
Great, thanks! |
No description provided.