mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-27 10:01:56 +08:00
Feat: get policy from directory props / Feat: return source enabled flag in file list
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user