Refactor: decide if there is a thumbnail based on the file extension

This commit is contained in:
HFO4
2020-04-22 11:04:35 +08:00
parent 7b571499a7
commit 514e069113
4 changed files with 29 additions and 8 deletions

View File

@@ -297,8 +297,6 @@ func GenericAfterUpload(ctx context.Context, fs *FileSystem) error {
// 异步尝试生成缩略图
if fs.User.Policy.IsThumbGenerateNeeded() {
go fs.GenerateThumbnail(ctx, file)
} else if fs.User.Policy.IsMockThumbNeeded() {
file.UpdatePicInfo("1,1")
}
return nil