mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
feat(thumb): use ffmpeg to generate thumb
This commit is contained in:
@@ -137,7 +137,13 @@ func (fs *FileSystem) GenerateThumbnail(ctx context.Context, file *model.File) e
|
||||
}
|
||||
defer source.Close()
|
||||
|
||||
thumbPath, err := thumb.Generators.Generate(ctx, source, file.Name, model.GetSettingByNames(
|
||||
// Provide file source path for local policy files
|
||||
src := ""
|
||||
if file.GetPolicy().Type == "local" {
|
||||
src = file.SourceName
|
||||
}
|
||||
|
||||
thumbPath, err := thumb.Generators.Generate(ctx, source, src, file.Name, model.GetSettingByNames(
|
||||
"thumb_width",
|
||||
"thumb_height",
|
||||
"thumb_builtin_enabled",
|
||||
|
||||
Reference in New Issue
Block a user