mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
feat: 超大文件和无法打开文件 都显示该文件无法预览
This commit is contained in:
parent
ea2c44341d
commit
ee7f486d2a
@ -23,7 +23,7 @@ ErrAppRequired: "请先安装 {{ .detail }} 应用"
|
|||||||
ErrNotInstall: "应用未安装"
|
ErrNotInstall: "应用未安装"
|
||||||
|
|
||||||
#file
|
#file
|
||||||
ErrFileCanNotRead: "文件不可读"
|
ErrFileCanNotRead: "此文件不支持预览"
|
||||||
ErrFileToLarge: "文件超过10M,无法打开"
|
ErrFileToLarge: "文件超过10M,无法打开"
|
||||||
|
|
||||||
#website
|
#website
|
||||||
|
@ -177,7 +177,7 @@ func (f *FileInfo) getContent() error {
|
|||||||
f.Content = string(cByte)
|
f.Content = string(cByte)
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
return buserr.New(constant.ErrFileToLarge)
|
return buserr.New(constant.ErrFileCanNotRead)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user