mirror of https://github.com/ElemeFE/element
upload: Increase support for Blob types
parent
6a5a3aaa2f
commit
06112e51da
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue