使用multipartUpload上传,出现错误
TypeError: Failed to execute 'fetch' on 'Window': Invalid value (req "error"), PUT http://mbrain.oss-cn-shanghai.aliyuncs.com/492ba2e84eb4db4b41f49b2813ec34bd.png -1 (connected: false, keepalive socket: false, agent status: {"createSocketCount":0,"closeSocketCount":0,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":0,"freeSockets":{},"sockets":{},"requests":{}})
headers: {}
at TypeError (native)
at n.149.d._onFinish (file:///Users/lsc/data/cbrain/trunk/code/wmind-desktop/js/aliyun-oss-sdk-4.3.0.min.js:8:26320)
at .<anonymous> (file:///Users/lsc/data/cbrain/trunk/code/wmind-desktop/js/aliyun-oss-sdk-4.3.0.min.js:8:25618)
at emitNone (events.js:91:20)
at emit (events.js:185:7)
at _ (file:///Users/lsc/data/cbrain/trunk/code/wmind-desktop/js/aliyun-oss-sdk-4.3.0.min.js:8:16322)
at x (file:///Users/lsc/data/cbrain/trunk/code/wmind-desktop/js/aliyun-oss-sdk-4.3.0.min.js:8:16378)
at n.137.a.end (file:///Users/lsc/data/cbrain/trunk/code/wmind-desktop/js/aliyun-oss-sdk-4.3.0.min.js:8:18493)
at n.149.d.end (file:///Users/lsc/data/cbrain/trunk/code/wmind-desktop/js/aliyun-oss-sdk-4.3.0.min.js:8:27916)
at i (file:///Users/lsc/data/cbrain/trunk/code/wmind-desktop/js/aliyun-oss-sdk-4.3.0.min.js:8:7532)
上传代码:
client.multipartUpload(filename, file, {
progress: progress,
}).then(function(result) {
console.info(result);
resolve(result);
}).catch(function(err) {
console.info(err);
reject(err);
});
上传参数:
filename:"492ba2e84eb4db4b41f49b2813ec34bd.png"
file:{name:勾选.png
path:/Users/lsc/Downloads/勾选.png
lastModified:1474960134000
lastModifiedDate:Tue Sep 27 2016 15:08:54 GMT+0800 (CST)
webkitRelativePath:
size:1388
type:image/png
slice:function slice() { [native code] }}
progress : function(p,cpt){
console.info(p);
console.info(cpt);
}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。