File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 104104 return ;
105105 }
106106 this . __dispatch (' imagechanged' , this .files .length > 1 ? this .files : this .files [0 ]);
107- if (this .compress && this . files [ 0 ][ ' type ' ] !== ' image/png ' && this . files [ 0 ][ ' type ' ] !== ' image/gif ' ) {
108- canvasHelper .compress (this .files [ 0 ] , 100 - this .compress , (code ) => {
107+ if (this .compress ) {
108+ canvasHelper .compress (this .files , 100 - this .compress , (code ) => {
109109 this .tryAjaxUpload (' ' , true , code);
110110 });
111111 } else {
264264 let data;
265265 if (isBinary) {
266266 data = {
267- type: this . files [ 0 ] [' type' ],
268- filename: encodeURI (this . files [ 0 ] [' name' ]),
267+ type: base64Code [' type' ],
268+ filename: encodeURI (base64Code [' name' ]),
269269 filed: this .inputOfFile ,
270- base64Code: base64Code
270+ base64Code: base64Code[ ' base64Code ' ]
271271 };
272272 if (typeof this .data === ' object' ) {
273273 data = Object .assign (this .data , data);
You can’t perform that action at this time.
0 commit comments