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

授权码登录情况下,if (region.indexOf('.') != -1) 判断出错 #33

Closed
ylmotol7 opened this issue Aug 13, 2017 · 3 comments
Closed
Labels

Comments

@ylmotol7
Copy link

ylmotol7 commented Aug 13, 2017

授权码登录情况下,oss2.js中if (region.indexOf('.') != -1) 判断有误,region的值为null。
请问如何治理
policy:
" {\n" +
" "Version": "1",\n" +
" "Statement": [\n" +
" {\n" +
" "Effect": "Allow",\n" +
" "Action": [\n" +
" "oss:"\n" +
" ],\n" +
" "Resource": [\n" +
" "acs:oss:
::bk-file/lz/"\n" +
" ]\n" +
" }\n" +
" ]\n" +
" }"

@aleelock
Copy link
Collaborator

oss browser提供生成授权码的功能,直接复制生成的授权码,可以用来登录。
如果是自己用程序生成授权码,要按照这个规则:https://github.com/aliyun/oss-browser/blob/master/authToken.md

@ylmotol7
Copy link
Author

我确实是通过这个方式生成的授权码,并且登录,删除,修改等没有问题,唯独上传有问题。
请问oss浏览器怎么生成授权码?

@aleelock
Copy link
Collaborator

代码可以参考这个: https://github.com/aliyun/oss-browser/blob/master/app/main/files/modals/grant-token-modal.js#L157
哦,请使用最新版本的oss browser 版本:1.2.2, 上一个版本上传功能有点问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants