mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
fix: cannot generate thumbnail for COS policy
This commit is contained in:
@@ -284,6 +284,10 @@ func HookPopPlaceholderToFile(picInfo string) Hook {
|
||||
return func(ctx context.Context, fs *FileSystem, fileHeader fsctx.FileHeader) error {
|
||||
fileInfo := fileHeader.Info()
|
||||
fileModel := fileInfo.Model.(*model.File)
|
||||
if picInfo == "" && fs.Policy.IsThumbExist(fileInfo.FileName) {
|
||||
picInfo = "1,1"
|
||||
}
|
||||
|
||||
return fileModel.PopChunkToFile(fileInfo.LastModified, picInfo)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user