mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: user storage pack
This commit is contained in:
@@ -99,7 +99,7 @@ func (fs *FileSystem) Preview(ctx context.Context, path string, isText bool) (*r
|
||||
|
||||
// 如果是文本文件预览,需要检查大小限制
|
||||
sizeLimit := model.GetIntSetting("maxEditSize", 2<<20)
|
||||
if fs.FileTarget[0].Size > uint64(sizeLimit) {
|
||||
if isText && fs.FileTarget[0].Size > uint64(sizeLimit) {
|
||||
return nil, ErrFileSizeTooBig
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user