{"record":{"id":"615a2623d6d8f003","repo":"AlistGo/alist","slug":"get-upload-data-error","errorCode":null,"errorMessage":"get upload data error","messagePattern":"get upload data error","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/chaoxing/driver.go","lineNumber":226,"sourceCode":"\tif err != nil {\n\t\treturn err\n\t}\n\tif resp.Result != 1 {\n\t\tmsg := fmt.Sprintf(\"error:%s\", resp.Msg)\n\t\treturn errors.New(msg)\n\t}\n\treturn nil\n}\n\nfunc (d *ChaoXing) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) error {\n\tvar resp UploadDataRsp\n\t_, err := d.request(\"https://noteyd.chaoxing.com/pc/files/getUploadConfig\", http.MethodGet, func(req *resty.Request) {\n\t}, &resp)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif resp.Result != 1 {\n\t\treturn errors.New(\"get upload data error\")\n\t}\n\tbody := &bytes.Buffer{}\n\twriter := multipart.NewWriter(body)\n\tfilePart, err := writer.CreateFormFile(\"file\", file.GetName())\n\tif err != nil {\n\t\treturn err\n\t}\n\t_, err = utils.CopyWithBuffer(filePart, file)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = writer.WriteField(\"_token\", resp.Msg.Token)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = writer.WriteField(\"puid\", fmt.Sprintf(\"%d\", resp.Msg.Puid))\n\tif err != nil {\n\t\tfmt.Println(\"Error writing param2 to request body:\", err)","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/chaoxing/driver.go#L208-L244","documentation":"Returned by ChaoXing Put when the upload-config request to https://noteyd.chaoxing.com/pc/files/getUploadConfig answers with resp.Result != 1, so no upload token/params were obtained and the multipart upload cannot proceed.","triggerScenarios":"Starting an upload while the session cookies are expired/invalid, the endpoint is unreachable behind a proxy returning a JSON error, or the account lacks upload permission for the drive.","commonSituations":"Long-lived storage with stale cookies; corporate proxy intercepting noteyd.chaoxing.com; account restricted from uploads.","solutions":["Refresh the ChaoXing storage login (cookies) and retry the upload","Verify network access to noteyd.chaoxing.com from the alist host","Check account status/quota in the ChaoXing client","Update alist so upstream fixes to the upload config flow are applied"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"null","typeGuard":null,"tryCatchPattern":"if err := d.Put(ctx, dst, f, up); err != nil && strings.Contains(err.Error(), \"get upload data error\") {\n    d.RefreshSession() // re-login\n    err = d.Put(ctx, dst, f, up)\n}","preventionTips":["Keep ChaoXing sessions fresh; uploads are the first to fail on expiry","Verify noteyd.chaoxing.com reachability from the host","Retry uploads from scratch so a new config token is fetched"],"tags":["chaoxing","upload","auth","api-error"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}