Test: pkg/task

This commit is contained in:
HFO4
2020-02-06 16:01:06 +08:00
parent 2b853dddd3
commit fc5b7d42c8
11 changed files with 707 additions and 7 deletions

View File

@@ -44,6 +44,9 @@ func (fs *FileSystem) ValidateLegalName(ctx context.Context, name string) bool {
// ValidateFileSize 验证上传的文件大小是否超出限制
func (fs *FileSystem) ValidateFileSize(ctx context.Context, size uint64) bool {
if fs.User.Policy.MaxSize == 0 {
return true
}
return size <= fs.User.Policy.MaxSize
}