{"record":{"id":"2c7f7f6e77b60246","repo":"AlistGo/alist","slug":"cannot-get-link-from-preview","errorCode":null,"errorMessage":"cannot get link from preview","messagePattern":"cannot get link from preview","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/quqi/util.go","lineNumber":175,"sourceCode":"\t}\n\n\treturn c\n}\n\nfunc (d *Quqi) linkFromPreview(id string) (*model.Link, error) {\n\tvar getDocResp GetDocRes\n\tif _, err := d.request(\"\", \"/api/doc/getDoc\", resty.MethodPost, func(req *resty.Request) {\n\t\treq.SetFormData(map[string]string{\n\t\t\t\"quqi_id\":   d.GroupID,\n\t\t\t\"tree_id\":   \"1\",\n\t\t\t\"node_id\":   id,\n\t\t\t\"client_id\": d.ClientID,\n\t\t})\n\t}, &getDocResp); err != nil {\n\t\treturn nil, err\n\t}\n\tif getDocResp.Data.OriginPath == \"\" {\n\t\treturn nil, errors.New(\"cannot get link from preview\")\n\t}\n\treturn &model.Link{\n\t\tURL: getDocResp.Data.OriginPath,\n\t\tHeader: http.Header{\n\t\t\t\"Origin\": []string{\"https://quqi.com\"},\n\t\t\t\"Cookie\": []string{d.Cookie},\n\t\t},\n\t}, nil\n}\n\nfunc (d *Quqi) linkFromDownload(id string) (*model.Link, error) {\n\tvar getDownloadResp GetDownloadResp\n\tif _, err := d.request(\"\", \"/api/doc/getDownload\", resty.MethodGet, func(req *resty.Request) {\n\t\treq.SetQueryParams(map[string]string{\n\t\t\t\"quqi_id\":     d.GroupID,\n\t\t\t\"tree_id\":     \"1\",\n\t\t\t\"node_id\":     id,\n\t\t\t\"url_type\":    \"undefined\",","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/quqi/util.go#L157-L193","documentation":"Error \"cannot get link from preview\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/quqi/util.go:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}