There was an error while loading. Please reload this page.
2 parents 0afe1ec + 5fcbc12 commit 04eb2a6Copy full SHA for 04eb2a6
src/vue-core-image-upload.vue
@@ -93,7 +93,8 @@
93
return this.__dispatch('errorhandle','TYPE ERROR');
94
}
95
96
- if (e.target.files[0].size > this.maxFileSize) {
+
97
+ if (Array.prototype.slice.call(e.target.files).some(file => file.size > this.maxFileSize)) {
98
var formatSize;
99
if (parseInt(this.maxFileSize / 1024 / 1024) > 0) {
100
formatSize = (this.maxFileSize / 1024 / 1024).toFixed(2) + 'MB';
@@ -109,7 +110,7 @@
109
110
if (this.multipleSize > 0 && e.target.files.length > this.multipleSize) {
111
console.warn('FILE NUM IS LARGER THAN ' + this.multipleSize);
112
return this.__dispatch('errorhandle', 'FILE NUM OVERLOAD');
- }
113
+ }
114
115
this.files = e.target.files;
116
if (this.crop || this.resize) {
0 commit comments