Update upload.js

This commit is contained in:
Anyon 2020-01-17 18:15:14 +08:00
parent bc5c57fed7
commit 73d8e86809

View File

@ -60,6 +60,7 @@ define(['md5'], function (SparkMD5, allowExtsMimes) {
return $.msg.tips(ret.info || '文件上传失败!'); return $.msg.tips(ret.info || '文件上传失败!');
} }
file = options.cache[index]; file = options.cache[index];
if (typeof file.xurl !== 'string') return $.msg.tips('无效的文件对象!');
if (typeof ret.uploaded === 'undefined' && typeof file.xurl === 'string') { if (typeof ret.uploaded === 'undefined' && typeof file.xurl === 'string') {
ret = {uploaded: true, url: file.xurl}; ret = {uploaded: true, url: file.xurl};
} }