解决由于普通上传和秒传返回格式不统一导致的初次上传必然失败的bug

This commit is contained in:
yasuo 2023-11-16 11:57:54 +08:00
parent c6ffb56e9a
commit bb3a90d28a

View File

@ -188,7 +188,13 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
});
} else if (parseInt(ret.code) === 200) {
(file.xurl = ret.data.url), that.progress('100.00', file);
that.done({code: 1, url: file.xurl, info: file.xstats}, file.index, file, done, '{:lang("文件秒传成功!")}');
that.done({
code: 1,
info: '{:lang("文件秒传成功!")}',
data: {
url: file.xurl,
}
}, file.index, file, done, '{:lang("文件秒传成功!")}');
} else {
that.event('upload.error', {file: file}, file, ret.info || ret.error.message || '{:lang("文件上传出错!")}');
}