Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The expiration time of the generated pre-signed URL does not take effect #33

Open
xigua88-66 opened this issue Oct 29, 2024 · 0 comments

Comments

@xigua88-66
Copy link

When I generated the pre-signed URL, I set an expiration time, but the link expiration time did not take effect, and the expiration time in the link was incorrect.

go version: 1.22
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.24.9+incompatible

`func SignDownUrl(path string) {
client, err := NewHuaWeiObsClient()
if err != nil {
fmt.Println(err)
}
expires := 60
input := obs.CreateSignedUrlInput{
Bucket: "migrate-to-minio-test",
Key: path,
Method: obs.HttpMethodGet,
Expires: expires,
}

signedUrl, err := client.CreateSignedUrl(&input)
if err != nil {
	fmt.Println(err)
}
fmt.Println(signedUrl.SignedUrl)

}
`
The generated link is like: http://migrate-to-minio-test.obs.cn-north-4.myhuaweicloud.com:80/hudi-release-0.12.0.tar.gz?AWSAccessKeyId=GR6MO2GUCFAVCI&Expires=1730200189&Signature=G6czdPuWyvFoVsHerIYkLNw4TkM%3D

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

No branches or pull requests

1 participant