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

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

内容简介: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....》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

算法设计

算法设计

Jon Kleinberg、Éva Tardos / 张立昂、屈婉玲 / 清华大学出版社 / 2007-3-1 / 75.00元

算法设计,ISBN:9787302143352,作者:(美)克林伯格(Kleinberg,J.),()塔多斯(Tardos,E.) 著,张立昂,屈婉玲 译一起来看看 《算法设计》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具