下面是我的代码:
var file = $(this).prop('files')[0];
var client = new OSS.Wrapper({
region: odata.region,
accessKeyId: odata.accesskey,
accessKeySecret: odata.keysecret,
stsToken: odata.securitytoken,
bucket: odata.bucket
});
var storeAs = odata.filename;
console.log(file.name + ' => ' + storeAs);
client.multipartUpload(
storeAs, file,{
checkpoint: checkpoint,
progress: function* (percentage, cpt) {
console.log('Progress: ' + percentage);
console.log('checkpoint: ' + JSON.stringify(cpt));
checkpoint = cpt;
}
}
).then(
function (result) {
console.log(result);
}
).catch(
function (err) {
console.log(err);
}
);
以下是返回的错误代码:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>InvalidPart</Code>
<Message>One or more of the specified parts could not be found or the specified entity tag might not have matched the part's entity tag.</Message>
<RequestId>5877284DE7D217CB1B39C200</RequestId>
<HostId>dxt-brand.oss-cn-shanghai.aliyuncs.com</HostId>
<ETag>undefined</ETag>
<PartNumber>1</PartNumber>
<UploadId>1FC722E82639475EB26E5D2A73A4F543</UploadId>
</Error>
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。