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

upload: Increase support for Blob types

parent 6a5a3aaa
...@@ -91,7 +91,8 @@ export default { ...@@ -91,7 +91,8 @@ export default {
const before = this.beforeUpload(rawFile); const before = this.beforeUpload(rawFile);
if (before && before.then) { if (before && before.then) {
before.then(processedFile => { 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); this.post(processedFile);
} else { } else {
this.post(rawFile); 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