|
93 | 93 | return this.__dispatch('errorhandle','TYPE ERROR'); |
94 | 94 | } |
95 | 95 | } |
96 | | - if (e.target.files[0].size > this.maxFileSize) { |
| 96 | + |
| 97 | + if (Array.prototype.slice.call(e.target.files).some(file => file.size > this.maxFileSize)) { |
97 | 98 | var formatSize; |
98 | 99 | if (parseInt(this.maxFileSize / 1024 / 1024) > 0) { |
99 | 100 | formatSize = (this.maxFileSize / 1024 / 1024).toFixed(2) + 'MB'; |
|
109 | 110 | if (this.multipleSize > 0 && e.target.files.length > this.multipleSize) { |
110 | 111 | console.warn('FILE NUM IS LARGER THAN ' + this.multipleSize); |
111 | 112 | return this.__dispatch('errorhandle', 'FILE NUM OVERLOAD'); |
112 | | - } |
| 113 | + } |
113 | 114 | |
114 | 115 | this.files = e.target.files; |
115 | 116 | if (this.crop || this.resize) { |
|
0 commit comments