Comments (9)
如果是部分机型出现的错误,可以尝试配置 CORS AllowHeaders: *
如果还是不行,提供一下请求返回的 RequestId
from cos-js-sdk-v4.
AllowHeaders已配置为*,目前只发现oppo r9跟锤子有问题,在successCallback返回的只有{"readyState":0,"responseText":"","status":0,"statusText":"error"}
from cos-js-sdk-v4.
返回的 header 里有个 x-cos-request-id 提供一下?
from cos-js-sdk-v4.
{
"code": -121,
"message": "ERROR_CMD_CORSRULE_NOT_MATCH",
"request_id": "NWE5M2ViODhfZDgyNzVkNjRfZDk1OF8yOTA5OTc="
}
from cos-js-sdk-v4.
ERROR_CMD_CORSRULE_NOT_MATCH 这个就是 CORS 配置有误
请检查请求参数是不是搞错了,导致请求到别的 bucket 去,然后检查你 bucket 的 CORS 是否正确。
如果还不行发一下你的 appid 和 bucket 看看
from cos-js-sdk-v4.
这个是公用的方法,其他机型都能正常上传,只有oppo r9 跟锤子会报这个错误,bucket确认是正确的
from cos-js-sdk-v4.
一般这个表现是因为某些浏览器请求的时候会带有特定的 Access-Control-Request-Headers: origin,accept,content-type
你再次确认下 CORS 配置:AllowHeaders: *
如果还不行,请贴上 appid 和 bucket 我检查下
from cos-js-sdk-v4.
抱歉,刚去检查了下配置,AllowHeaders没有配上导致的,耽误您时间了,实在抱歉,现在好了
from cos-js-sdk-v4.
ok
from cos-js-sdk-v4.
Related Issues (20)
- 用npm包引入的方式使用,之前有引入jquery1.12.4就报错了 HOT 2
- 分片上传时,Post 请求响应404 HOT 2
- iphone5s跟iphone6上传普通文件失败的问题 HOT 4
- 分片上传提示 404
- __WEBPACK_IMPORTED_MODULE_1_cos_js_sdk_v4__.CosCloud is not a constructor HOT 2
- 很好
- 请问有没有提供暂停任务的接口呢 HOT 1
- iphone6s 系统版本10.0.2中使用js SDK时SDK抛出错误 HOT 2
- 请问下,sha1值只能在文件大小大于20M才会就算么? 我想任何文件都计算sha1值,怎么改? HOT 1
- 你好,我想问下cos-js-sdk-v4能在小程序中使用吗? HOT 1
- ios9上传图片,无法识别 HOT 4
- 这个SDK能用在小程序的图片上传功能嘛? HOT 1
- 不能够去除sha-1计算吗? HOT 1
- 后端签名时应当带上操作 HOT 2
- 建议这个sdk添加对微信小程序的支持 HOT 3
- 多图片上传问题 HOT 1
- 为什么错误处理要用success,不能用error吗
- 批量上传
- COS JS SDK 推荐使用 cos-js-sdk-v5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cos-js-sdk-v4.