修改完成
This commit is contained in:
@@ -225,6 +225,7 @@
|
||||
|
||||
if (!files.length || !target || redirectUnauthorized(api)) return;
|
||||
input.disabled = true;
|
||||
if (root.AttachmentEditor) root.AttachmentEditor.setBusy(target, true);
|
||||
|
||||
try {
|
||||
for (index = 0; index < files.length; index += 1) {
|
||||
@@ -235,7 +236,9 @@
|
||||
}
|
||||
}));
|
||||
if (!result.ossId) throw new Error('上传响应缺少 ossId');
|
||||
target.value = mergeUploadTargetValue(target.value, result.ossId, multiple);
|
||||
if (!root.AttachmentEditor || !root.AttachmentEditor.addUploaded(target, result, files[index])) {
|
||||
target.value = mergeUploadTargetValue(target.value, result.ossId, multiple);
|
||||
}
|
||||
setUploadStatus(status, '', buildUploadStatus(result.fileName || files[index].name, result.ossId));
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -244,6 +247,7 @@
|
||||
showMessage(isForbidden(error) ? '当前账号无权上传文件。' : (error.message || '上传失败'));
|
||||
} finally {
|
||||
input.disabled = false;
|
||||
if (root.AttachmentEditor) root.AttachmentEditor.setBusy(target, false);
|
||||
input.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user