1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 14:08:06 +08:00

feat: 超大文件和无法打开文件 都显示该文件无法预览

This commit is contained in:
zhengkunwang223 2022-12-09 10:35:58 +08:00 committed by zhengkunwang223
parent ea2c44341d
commit ee7f486d2a
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ ErrAppRequired: "请先安装 {{ .detail }} 应用"
ErrNotInstall: "应用未安装"
#file
ErrFileCanNotRead: "文件不可读"
ErrFileCanNotRead: "此文件不支持预览"
ErrFileToLarge: "文件超过10M,无法打开"
#website

View File

@ -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)
}
}