Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

浏览器上传Blob格式文件不支持。 #325

Closed
mcdyzg opened this issue Dec 19, 2017 · 5 comments
Closed

浏览器上传Blob格式文件不支持。 #325

mcdyzg opened this issue Dec 19, 2017 · 5 comments

Comments

@mcdyzg
Copy link

mcdyzg commented Dec 19, 2017

我用Canvas.toBlob导出的Blob格式文件上传会报

Error: _getFileSize requires Buffer/File/String.

发现是multipart.js browser/multipart.js里305行

is.file = function (file) {
  return typeof(File) !== 'undefined' && file instanceof File;
};

这个方法挡住了,能否增加下对Blob格式的支持,

return typeof(File) !== 'undefined' && (file instanceof File || file instanceof Blob);

谢谢

@PeterRao
Copy link
Collaborator

PeterRao commented Jan 8, 2018

把blob转换成file对象

@zcoding
Copy link

zcoding commented Feb 26, 2018

居然没有直接支持 Blob 的方法,那个 Buffer 反而不常用,强烈建议支持 Blob

@binghaiwang
Copy link
Contributor

blob格式,已经安排支持了。

@duan007a
Copy link
Contributor

#400

@mcdyzg
Copy link
Author

mcdyzg commented Mar 26, 2018

谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants