leancloud storage版本为2.1.2
android上传图片时报如下错误,但是在ios上完全正常。
我的app采用react native开发,android与ios的代码没有差别。

upload failed: Error: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.
    at Request.crossDomainError (av-rn.js:3601)
    at XMLHttpRequest.xhr.onreadystatechange (av-rn.js:3709)
    at XMLHttpRequest.dispatchEvent (event-target.js:172)
    at XMLHttpRequest.setReadyState (XMLHttpRequest.js:534)
    at XMLHttpRequest.__didCompleteResponse (XMLHttpRequest.js:378)
    at XMLHttpRequest.js:482
    at RCTDeviceEventEmitter.emit (EventEmitter.js:181)
    at MessageQueue.__callFunction (MessageQueue.js:236)
    at MessageQueue.js:108
    at guard (MessageQueue.js:46)

investigating.

请问你用的 React Native 是什么版本?

"leancloud-storage": "^2.1.1",
"react": "~15.4.0",
**"react-native": "0.41.2",**

confirmed。

如果紧急,可以暂时退回到 ^1 ,我这边测试没有问题。

请问是 回退leancloud-storage还是react-native的版本

已经找到原因了。

紧急的话,退回到 leancloud-storage@1

react-native iOS 上传错误啊 报错Can‘t find variable :atob
传值为base64

或者,暂时在 AV.File 构造是时传入第三个参数 type。

回退到上个版本不行“ UNMET PEER DEPENDENCY leancloud-storage@2.1.0 invalid”
AV.File 增加type参数可以解决问题!
非常感谢!

下个 patch 版本会修复这个问题