开发者社区> 问答> 正文

分片上传失败,和本来的app.js是一样的,但是400错误

var uploadFile = function (client) {
var file = document.getElementById('file').files[0];
//var key = document.getElementById('object-key-file').value.trim() || 'object';
//console.log(file.name + ' => ' + key);

if(file.size>(1024*1024*2)){
    alert('请上传2M以下的图片!')
    return;
}

return client.multipartUpload(url_+file.name, file, {

progress: progress

}).then(function (res) {

console.log('upload success: %j', res);
//return listFiles(client);
location.href='';

});
};

展开
收起
xinyale 2016-05-10 17:15:40 2828 0
0 条回答
写回答
取消 提交回答
问答地址:
问答排行榜
最热
最新

相关电子书

更多
探究 Node.js 的服务端之路 立即下载
APP加固新方向 --混淆和瘦身 立即下载
穆客带你快速定位Node.js内存泄露 立即下载