Feat: get OneDrive thumbnails

This commit is contained in:
HFO4
2020-01-21 13:27:20 +08:00
parent 6aee31341f
commit 06ff8b5a50
7 changed files with 94 additions and 12 deletions

View File

@@ -31,6 +31,7 @@ func (fs *FileSystem) GetThumb(ctx context.Context, id uint) (*response.ContentR
w, h := fs.GenerateThumbnailSize(0, 0)
ctx = context.WithValue(ctx, fsctx.ThumbSizeCtx, [2]uint{w, h})
ctx = context.WithValue(ctx, fsctx.FileModelCtx, fs.FileTarget[0])
res, err := fs.Handler.Thumb(ctx, fs.FileTarget[0].SourceName)
// TODO 出错时重新生成缩略图