mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: regenerate when thumbnail files not exist
This commit is contained in:
@@ -38,7 +38,11 @@ func (fs *FileSystem) GetThumb(ctx context.Context, id uint) (*response.ContentR
|
||||
res.MaxAge = model.GetIntSetting("preview_timeout", 60)
|
||||
}
|
||||
|
||||
// TODO 出错时重新生成缩略图
|
||||
// 出错时重新生成缩略图
|
||||
if err != nil {
|
||||
fs.GenerateThumbnail(ctx, &fs.FileTarget[0])
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user