AlistGo/alist · error

get upload data error

Error message

get upload data error

What it means

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.

Source

Thrown at drivers/chaoxing/driver.go:226

	if err != nil {
		return err
	}
	if resp.Result != 1 {
		msg := fmt.Sprintf("error:%s", resp.Msg)
		return errors.New(msg)
	}
	return nil
}

func (d *ChaoXing) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) error {
	var resp UploadDataRsp
	_, err := d.request("https://noteyd.chaoxing.com/pc/files/getUploadConfig", http.MethodGet, func(req *resty.Request) {
	}, &resp)
	if err != nil {
		return err
	}
	if resp.Result != 1 {
		return errors.New("get upload data error")
	}
	body := &bytes.Buffer{}
	writer := multipart.NewWriter(body)
	filePart, err := writer.CreateFormFile("file", file.GetName())
	if err != nil {
		return err
	}
	_, err = utils.CopyWithBuffer(filePart, file)
	if err != nil {
		return err
	}
	err = writer.WriteField("_token", resp.Msg.Token)
	if err != nil {
		return err
	}
	err = writer.WriteField("puid", fmt.Sprintf("%d", resp.Msg.Puid))
	if err != nil {
		fmt.Println("Error writing param2 to request body:", err)

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Refresh the ChaoXing storage login (cookies) and retry the upload
  2. Verify network access to noteyd.chaoxing.com from the alist host
  3. Check account status/quota in the ChaoXing client
  4. Update alist so upstream fixes to the upload config flow are applied
Defensive patterns

Strategy: retry

Validate before calling

null

Try / catch

if err := d.Put(ctx, dst, f, up); err != nil && strings.Contains(err.Error(), "get upload data error") {
    d.RefreshSession() // re-login
    err = d.Put(ctx, dst, f, up)
}

Prevention

When it happens

Trigger: 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.

Common situations: Long-lived storage with stale cookies; corporate proxy intercepting noteyd.chaoxing.com; account restricted from uploads.

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/615a2623d6d8f003. Report an issue: GitHub.