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,即可,就是这么简单,但,真心花了不少时间处理(最后要看这里:https://help.aliyun.com/document_detail/32069.htm,如果用了分片,还是要再加一个:etag和x-oss-request-id)
有点小意外的是。AliOss的文档中有写:oss.put(name, object ),说是第二个参数支持File和Blob对象(嗯,在浏览器中)
- 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
然而在实际使用的时候,却是报错: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??
不管了。已解决。就是有点渗的慌