Feat: regenerate when thumbnail files not exist
This commit is contained in:
parent
034ed956a3
commit
6006ff4d22
2 changed files with 6 additions and 2 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit c5e374fd2c8cdfe8a4bece60dba7d27b047eb0f1
|
||||
Subproject commit 8526ee7a07d83da3293ebd4229118473791b0ed5
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue