From ee7f486d2a20d5b51e7df8c2633bcd0c9dd53028 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Fri, 9 Dec 2022 10:35:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B6=85=E5=A4=A7=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=92=8C=E6=97=A0=E6=B3=95=E6=89=93=E5=BC=80=E6=96=87=E4=BB=B6?= =?UTF-8?q?=20=E9=83=BD=E6=98=BE=E7=A4=BA=E8=AF=A5=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/i18n/lang/zh.yaml | 2 +- backend/utils/files/fileinfo.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/i18n/lang/zh.yaml b/backend/i18n/lang/zh.yaml index f7474d651..de1238cb6 100644 --- a/backend/i18n/lang/zh.yaml +++ b/backend/i18n/lang/zh.yaml @@ -23,7 +23,7 @@ ErrAppRequired: "请先安装 {{ .detail }} 应用" ErrNotInstall: "应用未安装" #file -ErrFileCanNotRead: "文件不可读" +ErrFileCanNotRead: "此文件不支持预览" ErrFileToLarge: "文件超过10M,无法打开" #website diff --git a/backend/utils/files/fileinfo.go b/backend/utils/files/fileinfo.go index fc7597c8d..8e7f7c8f1 100644 --- a/backend/utils/files/fileinfo.go +++ b/backend/utils/files/fileinfo.go @@ -177,7 +177,7 @@ func (f *FileInfo) getContent() error { f.Content = string(cByte) return nil } else { - return buserr.New(constant.ErrFileToLarge) + return buserr.New(constant.ErrFileCanNotRead) } }