Feat: remote upload callback / validation

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

No files matched your search

+1 -4
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 验证文件扩展名