File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " rc-upload" ,
3
- "version" : " 3.0.3 " ,
3
+ "version" : " 3.0.4 " ,
4
4
"description" : " upload ui component for react" ,
5
5
"keywords" : [
6
6
" react" ,
33
33
"compile" : " rc-tools run compile --babel-runtime" ,
34
34
"pub" : " rc-tools run pub --babel-runtime" ,
35
35
"lint" : " rc-tools run lint" ,
36
- "test" : " jest --setupTestFrameworkScriptFile=raf/polyfill" ,
36
+ "test" : " jest --setupTestFrameworkScriptFile=raf/polyfill" ,
37
37
"coverage" : " jest --coverage && cat ./coverage/lcov.info | coveralls"
38
38
},
39
39
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -62,7 +62,11 @@ export default function upload(option) {
62
62
} ) ;
63
63
}
64
64
65
- formData . append ( option . filename , option . file , option . file instanceof Blob && option . file . name ) ;
65
+ if ( option . file instanceof Blob ) {
66
+ formData . append ( option . filename , option . file , option . file . name ) ;
67
+ } else {
68
+ formData . append ( option . filename , option . file ) ;
69
+ }
66
70
67
71
xhr . onerror = function error ( e ) {
68
72
option . onError ( e ) ;
You can’t perform that action at this time.
0 commit comments