aliyun:One or more of the sp....

栏目: Html5 · 发布时间: 6年前

内容简介:Aliyun oss 报错:  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.报错是在multipartUpload方法中。如果要解决也很方便,在跨域设置中,暴露的headers中增加一个:ETag,即可,就是这么简单,但,真心花了不少时间处理这回就真实是支持的。

Aliyun oss 报错:  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.

报错是在multipartUpload方法中。如果要解决也很方便,在跨域设置中,暴露的headers中增加一个:ETag,即可,就是这么简单,但,真心花了不少时间处理

有点小意外的是。AliOss的文档中有写:oss.put(name, object ),说是第二个参数支持File和Blob对象(嗯,在浏览器中)

https://github.com/ali-sdk/ali-oss#putname-file-options

  1. file {String|Buffer|ReadStream|File(only support Browser)|Blob(only support Browser)} object local path, content buffer or ReadStream content instance use in Node, Blob and html5 File
  2.   
然而在实际使用的时候,却是报错:TypeError: Must provide String/Buffer/ReadableStream for put.,这,简直是忽悠人啊。再比如说,multipartUpload,他说:

XML/HTML代码

file {String|File(only support Browser)|Blob(only support Browser)} file path or HTML5 Web File or web Blob  

这回就真实是支持的。

----

难道区别就在于上面写的是:object local path而下面写的是 file path??

不管了。已解决。就是有点渗的慌

本站采用版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"

", 保留原始链接, 此外还必须标注原文标题和链接.


以上所述就是小编给大家介绍的《aliyun:One or more of the sp....》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Code Complete

Code Complete

Steve McConnell / Microsoft Press / 2004-6-19 / GBP 40.99

在线阅读本书 Widely considered one of the best practical guides to programming, Steve McConnells original CODE COMPLETE has been helping developers write better software for more than a decade. Now......一起来看看 《Code Complete》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试