{"record":{"id":"e8bedd8503e2360e","repo":"cloudreve/cloudreve","slug":"thumb-not-supported-in-onedrive-w","errorCode":null,"errorMessage":"thumb not supported in OneDrive: %w","messagePattern":"thumb not supported in OneDrive: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/filemanager/driver/onedrive/onedrive.go","lineNumber":145,"sourceCode":"\tdefer file.Close()\n\n\treturn handler.client.Upload(ctx, file)\n}\n\n// Delete 删除一个或多个文件，\n// 返回未删除的文件，及遇到的最后一个错误\nfunc (handler *Driver) Delete(ctx context.Context, files ...string) ([]string, error) {\n\treturn handler.client.BatchDelete(ctx, files)\n}\n\n// Thumb 获取文件缩略图\nfunc (handler *Driver) Thumb(ctx context.Context, expire *time.Time, ext string, e fs.Entity) (string, error) {\n\tres, err := handler.client.GetThumbURL(ctx, e.Source())\n\tif err != nil {\n\t\tvar apiErr *RespError\n\t\tif errors.As(err, &apiErr); err == ErrThumbSizeNotFound || (apiErr != nil && apiErr.APIError.Code == notFoundError) {\n\t\t\t// OneDrive cannot generate thumbnail for this file\n\t\t\treturn \"\", fmt.Errorf(\"thumb not supported in OneDrive: %w\", err)\n\t\t}\n\t}\n\n\treturn res, nil\n}\n\n// Source 获取外链URL\nfunc (handler *Driver) Source(ctx context.Context, e fs.Entity, args *driver.GetSourceArgs) (string, error) {\n\t// 缓存不存在，重新获取\n\tres, err := handler.client.Meta(ctx, \"\", e.Source())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn res.DownloadURL, nil\n}\n\n// Token 获取上传会话URL","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/cloudreve/cloudreve/blob/20c95ad73f3a8bcb72887fea91ff31ab24fa1011/pkg/filemanager/driver/onedrive/onedrive.go#L127-L163","documentation":"Error \"thumb not supported in OneDrive: %w\" thrown in cloudreve/cloudreve.","triggerScenarios":"Thrown at pkg/filemanager/driver/onedrive/onedrive.go:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"20c95ad73f3a8bcb72887fea91ff31ab24fa1011","analyzedAt":"2026-08-16T01:42:55.403Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}