Commit 06112e51 authored by Div's avatar Div Committed by 杨奕

upload: Increase support for Blob types

parent 6a5a3aaa
......@@ -91,7 +91,8 @@ export default {
const before = this.beforeUpload(rawFile);
if (before && before.then) {
before.then(processedFile => {
if (Object.prototype.toString.call(processedFile) === '[object File]') {
const fileType = Object.prototype.toString.call(processedFile);
if (fileType === '[object File]' || fileType === '[object Blob]') {
this.post(processedFile);
} else {
this.post(rawFile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment