fix: cannot generate thumbnail for COS policy

pull/1259/head
HFO4 3 years ago
parent 6af1eeb9fb
commit d51351eebd

@ -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…
Cancel
Save