zan-upload
Advanced tools
Comparing version 4.5.2 to 4.5.3
@@ -71,3 +71,3 @@ 'use strict'; | ||
var mimeType = (0, _fileType2['default'])((0, _utils.base64ToArrayBuffer)(e.target.result.replace(/^(.*?)base64,/, ''))); | ||
if (options.accept && options.accept.indexOf(mimeType.mime) > -1) { | ||
if (options.accept && (!mimeType || options.accept.indexOf(mimeType.mime) > -1)) { | ||
resolve({ | ||
@@ -74,0 +74,0 @@ src: e.target.result, |
@@ -368,3 +368,3 @@ 'use strict'; | ||
var mimeType = (0, _fileType2['default'])((0, _utils.base64ToArrayBuffer)(e.target.result.replace(/^(.*?)base64,/, ''))); | ||
if (options.accept && options.accept.indexOf(mimeType.mime) > -1) { | ||
if (options.accept && (!mimeType || options.accept.indexOf(mimeType.mime) > -1)) { | ||
localFiles.push({ | ||
@@ -371,0 +371,0 @@ src: e.target.result, |
{ | ||
"name": "zan-upload", | ||
"version": "4.5.2", | ||
"version": "4.5.3", | ||
"description": "这是一个React组件", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -263,3 +263,3 @@ ## zan-upload | ||
##### 4.4.1 (2017-10-30) | ||
#### 4.4.1 (2017-10-30) | ||
@@ -277,1 +277,5 @@ - 去掉 tokenUrl 和 fetchUrl 的默认值,这两个属性变更为必填项 | ||
- 手动引入 file-type,防止 es6 代码不编译 | ||
#### 4.5.3 (2017-11-10) | ||
- 修复无法检测文件类型导致文件上传不了的问题 |
Sorry, the diff of this file is too big to display
814951
280