Feat: remote upload callback / validation

This commit is contained in:
HFO4
2019-12-30 19:37:21 +08:00
parent d29b7ef6f8
commit 4a5782b4e5
6 changed files with 61 additions and 8 deletions

View File

@@ -44,10 +44,7 @@ func (fs *FileSystem) ValidateFileSize(ctx context.Context, size uint64) bool {
// ValidateCapacity 验证并扣除用户容量
func (fs *FileSystem) ValidateCapacity(ctx context.Context, size uint64) bool {
if fs.User.IncreaseStorage(size) {
return true
}
return false
return fs.User.IncreaseStorage(size)
}
// ValidateExtension 验证文件扩展名