fix: cannot generate thumbnail for COS policy
This commit is contained in:
parent
6af1eeb9fb
commit
d51351eebd
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue