mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: remote test ping and ping-back
This commit is contained in:
@@ -67,8 +67,10 @@ func HookSlaveUploadValidate(ctx context.Context, fs *FileSystem) error {
|
||||
policy := ctx.Value(fsctx.UploadPolicyCtx).(serializer.UploadPolicy)
|
||||
|
||||
// 验证单文件尺寸
|
||||
if file.GetSize() > policy.MaxSize {
|
||||
return ErrFileSizeTooBig
|
||||
if policy.MaxSize > 0 {
|
||||
if file.GetSize() > policy.MaxSize {
|
||||
return ErrFileSizeTooBig
|
||||
}
|
||||
}
|
||||
|
||||
// 验证文件名
|
||||
|
||||
Reference in New Issue
Block a user