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

上传文件显示missing param SecretId的错误 #161

Closed
coderjy opened this issue Dec 6, 2022 · 1 comment
Closed

上传文件显示missing param SecretId的错误 #161

coderjy opened this issue Dec 6, 2022 · 1 comment

Comments

@coderjy
Copy link

coderjy commented Dec 6, 2022

问题:SecretId是传了的,但还是提示missing param SecretId
解决:在cos.js文件中修改89行代码Credentials的判断条件

源代码:
if (this.options.Credentials) {
this.options.SecretId = this.options.Credentials.secretId || '';
this.options.SecretKey = this.options.Credentials.secretKey || '';

修改后的代码: this.options.Credentials是一个对象,if中是永远成立的,就需要对secretId,secretKey进行单独判断
if (this.options.Credentials.secretId && this.options.Credentials.secretKey) {
this.options.SecretId = this.options.Credentials.secretId || '';
this.options.SecretKey = this.options.Credentials.secretKey || '';
}

@livehigh
Copy link
Collaborator

livehigh commented Dec 6, 2022

辛苦更新到最新版2.11.18 这里已经修复 感谢反馈~

@livehigh livehigh closed this as completed Dec 6, 2022
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

2 participants