oss上传:One or more of the specified parts could not be found or the specified entity tag might not ha

在使用OSS Browser上传文件到阿里云OSS时遇到错误,提示部分文件未找到或Etag不符。解决方法是配置OSS的跨域规则,允许PUT, GET, POST, DELETE, HEAD方法,暴露Header中的Etag,然后刷新浏览器,即可成功上传。" 106302451,6234485,PHP+JS 实现扫码枪签到功能,"['PHP', '前端开发']
摘要由CSDN通过智能技术生成

使用OSS Browser浏览器上传文件,提示:

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>5EF05589FBD3EC32334477C6</RequestId>
  <HostId>xxxx.oss-cn-hangzhou.aliyuncs.com</HostId>
  <ETag>undefined</ETag>
  <PartNumber>1</PartNumber>
  <UploadId>F045F0886BA142A69671908EEF706C30</UploadId>
</Error>

解决办法很简单有效,是因为这种方式需要跨越,并且需要将特定字段Etag在header中展示出来。阿里云设置跨越如下。

找到指定oss bucket,权限管理>跨域设置>设置>创建规则或者编辑

  • 来源:*
  • 允许Metho
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值