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

小程序中使用 cos-wx-sdk-v5 进行上传文件,SecretId 传不到sdk中的问题 #41

Open
nick3108qqcom opened this issue May 10, 2018 · 1 comment

Comments

@nick3108qqcom
Copy link

按照官网的例子写的,但是在sdk中并没有接受到SecretId

@nick3108qqcom
Copy link
Author

nick3108qqcom commented May 10, 2018

var cos = new COS({
      getAuthorization: function (options, callback) {
        http.http(api.api.getImageSign, 'POST', {}).then(res => {
          var secretInfo = res.content;
          console.log(secretInfo)
          callback({
            SecretId: secretInfo.tmpSecretId,
            SecretKey: secretInfo.tmpSecretKey,
            XCosSecurityToken: secretInfo.sessionToken,
            ExpiredTime: secretInfo.expiredTime,
          });
        })
      },
    })

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