Feat: get policy from directory props / Feat: return source enabled flag in file list

This commit is contained in:
HFO4
2022-02-10 19:25:38 +08:00
parent c84d0114ae
commit 855c9d92c4
14 changed files with 101 additions and 91 deletions

View File

@@ -119,7 +119,6 @@ func HookResetPolicy(ctx context.Context, fs *FileSystem) error {
}
fs.Policy = originFile.GetPolicy()
fs.User.Policy = *fs.Policy
return fs.DispatchHandler()
}
@@ -317,7 +316,7 @@ func GenericAfterUpload(ctx context.Context, fs *FileSystem) error {
fs.SetTargetFile(&[]model.File{*file})
// 异步尝试生成缩略图
if fs.User.Policy.IsThumbGenerateNeeded() {
if fs.Policy.IsThumbGenerateNeeded() {
fs.recycleLock.Lock()
go func() {
defer fs.recycleLock.Unlock()