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 104
104
return ;
105
105
}
106
106
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 ) => {
109
109
this .tryAjaxUpload (' ' , true , code);
110
110
});
111
111
} else {
264
264
let data;
265
265
if (isBinary) {
266
266
data = {
267
- type: this . files [ 0 ] [' type' ],
268
- filename: encodeURI (this . files [ 0 ] [' name' ]),
267
+ type: base64Code [' type' ],
268
+ filename: encodeURI (base64Code [' name' ]),
269
269
filed: this .inputOfFile ,
270
- base64Code: base64Code
270
+ base64Code: base64Code[ ' base64Code ' ]
271
271
};
272
272
if (typeof this .data === ' object' ) {
273
273
data = Object .assign (this .data , data);
You can’t perform that action at this time.
0 commit comments