diff --git a/src/views/system/user/AvatarUpload.vue b/src/views/system/user/AvatarUpload.vue index 9b78ebc..235eb5b 100644 --- a/src/views/system/user/AvatarUpload.vue +++ b/src/views/system/user/AvatarUpload.vue @@ -43,12 +43,12 @@ if (!isJpgOrPng) { message.error('You can only upload JPG/PNG file!'); } - const isLt2M = file.size / 1024 / 1024 < 30; - if (!isLt2M) { - message.error('Image must smaller than 30MB!'); + const isLt = file.size / 1024 / 1024 < 50; + if (!isLt) { + message.error('Image must smaller than 50MB!'); } - return isJpgOrPng && isLt2M; + return isJpgOrPng && isLt; }; const uploadAvatar = async (file: FileType) => { diff --git a/src/views/tool/storage/upload-modal.vue b/src/views/tool/storage/upload-modal.vue index ab61020..eafb9cf 100644 --- a/src/views/tool/storage/upload-modal.vue +++ b/src/views/tool/storage/upload-modal.vue @@ -13,7 +13,7 @@ @cancel="onCancel" > - + 选择文件 @@ -88,8 +88,8 @@ }; const beforeUpload: UploadProps['beforeUpload'] = async (file) => { - if (file.size / 1024 / 1024 > 30) { - message.error('单个文件不超过30MB'); + if (file.size / 1024 / 1024 > 50) { + message.error('单个文件不超过50MB'); } else { const item: FileItem = { file,