上传限制50M 超时30秒

dianlixunjian
Zhufu 2024-08-08 18:12:07 +08:00
parent fb68530f0a
commit eb1b335e96
2 changed files with 10 additions and 10 deletions

View File

@ -188,15 +188,15 @@
//
setTimeout(() => (isActMsg.value = true), 1000);
}
// const isLt = file.size / 1024 / 1024 > maxSize;
// if (isLt) {
// createMessage.error(t('component.upload.maxSizeMultiple', [maxSize]));
// isLtMsg.value = false;
// //
// setTimeout(() => (isLtMsg.value = true), 1000);
// }
// return (isAct && !isLt) || Upload.LIST_IGNORE;
return isAct || Upload.LIST_IGNORE;
const isLt = file.size / 1024 / 1024 > 50;
if (isLt) {
createMessage.error(t('component.upload.maxSizeMultiple', [50]));
isLtMsg.value = false;
//
setTimeout(() => (isLtMsg.value = true), 1000);
}
return (isAct && !isLt) || Upload.LIST_IGNORE;
// return isAct || Upload.LIST_IGNORE;
};
async function customRequest(info: UploadRequestOption<any>) {

View File

@ -233,7 +233,7 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
// authentication schemese.g: Bearer
// authenticationScheme: 'Bearer',
authenticationScheme: '',
timeout: 10 * 1000,
timeout: 30 * 1000,
// 基础接口地址
// baseURL: globSetting.apiUrl,