{"record":{"id":"b9b7e77d81cbc3a5","repo":"AlistGo/alist","slug":"can-t-convert-obj-to-url","errorCode":null,"errorMessage":"can't convert obj to URL","messagePattern":"can't convert obj to URL","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/doubao/driver.go","lineNumber":159,"sourceCode":"\t\t\t\tdownloadUrl = r.Data.FileUrls[0].MainURL\n\t\t\t}\n\t\tdefault:\n\t\t\treturn nil, errs.NotImplement\n\t\t}\n\n\t\t// 生成标准的Content-Disposition\n\t\tcontentDisposition := generateContentDisposition(u.Name)\n\n\t\treturn &model.Link{\n\t\t\tURL: downloadUrl,\n\t\t\tHeader: http.Header{\n\t\t\t\t\"User-Agent\":          []string{UserAgent},\n\t\t\t\t\"Content-Disposition\": []string{contentDisposition},\n\t\t\t},\n\t\t}, nil\n\t}\n\n\treturn nil, errors.New(\"can't convert obj to URL\")\n}\n\nfunc (d *Doubao) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error {\n\tvar r UploadNodeResp\n\t_, err := d.request(\"/samantha/aispace/upload_node\", http.MethodPost, func(req *resty.Request) {\n\t\treq.SetBody(base.Json{\n\t\t\t\"node_list\": []base.Json{\n\t\t\t\t{\n\t\t\t\t\t\"local_id\":  uuid.New().String(),\n\t\t\t\t\t\"name\":      dirName,\n\t\t\t\t\t\"parent_id\": parentDir.GetID(),\n\t\t\t\t\t\"node_type\": 1,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t}, &r)\n\treturn err\n}","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/doubao/driver.go#L141-L177","documentation":"Error \"can't convert obj to URL\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at drivers/doubao/driver.go:159 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"}