开发者社区> 问答> 正文

oss multipartUpload上传出错 Invalid value

使用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);

}

展开
收起
派生科技 2016-10-28 14:35:06 8491 0
3 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
OSS运维进阶实战手册 立即下载
《OSS运维基础实战手册》 立即下载
OSS运维基础实战手册 立即下载