diff --git a/app/admin/view/api/upload.js b/app/admin/view/api/upload.js index d931d7d28..0b05b7eb2 100644 --- a/app/admin/view/api/upload.js +++ b/app/admin/view/api/upload.js @@ -72,11 +72,12 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) { var that = this.init(); layui.each(files, function (index, file) { that.count.total++, file.index = index, that.files[index] = file; - if (that.option.size && file.size > that.option.size) { - that.event('upload.error', {file: file}, file, '大小超限'); - } else if (!that.option.hide) { + if (!that.option.hide && !file.notify) { file.notify = new NotifyExtend(file); } + if (that.option.size && file.size > that.option.size) { + that.event('upload.error', {file: file}, file, '大小超出限制'); + } }), layui.each(files, function (index, file) { // 禁传异常状态文件 if (typeof file.xstate === 'number' && file.xstate === -1) return;