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