阿里oss multipartUpload 错误

问题描述

分片上传 最后一个请求报错 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 错误 跨域

// 响应信息
<?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>5C455831BB4097C0D8F96794</RequestId> <HostId>wolaile.oss-cn-hangzhou.aliyuncs.com</HostId> <ETag>undefined</ETag> <PartNumber>1</PartNumber> <UploadId>4B1BF2F5DE064694870DD46E657F0CA6</UploadId> </Error> 复制代码

产生缘由

经检查发现 ETag 为undefinedbash

解决方法

在阿里云oss控制台 基础设置 > 跨域规则设置 > 编辑规则 “暴露 Headers” 中增长 ETag 便可解决问题阿里云

相关文章
相关标签/搜索