AlistGo/alist · error

up status: %d, error: %s

Error message

up status: %d, error: %s

What it means

Raised in Cloudreve v4's S3 upload finalization. After all parts are uploaded, the driver sends the complete-multipart-upload request; a non-200 response aborts with this message embedding the HTTP status and the raw body (S3 XML error). On success it then fires the /callback/s3/{session}/{secret} POST, whose failure returns a different error.

Source

Thrown at drivers/cloudreve_v4/util.go:469

	bodyBuilder.WriteString("</CompleteMultipartUpload>")
	req, err := http.NewRequest(
		"POST",
		u.CompleteURL,
		strings.NewReader(bodyBuilder.String()),
	)
	if err != nil {
		return err
	}
	req.Header.Set("Content-Type", "application/xml")
	req.Header.Set("User-Agent", d.getUA())
	res, err := base.HttpClient.Do(req)
	if err != nil {
		return err
	}
	defer res.Body.Close()
	if res.StatusCode != http.StatusOK {
		body, _ := io.ReadAll(res.Body)
		return fmt.Errorf("up status: %d, error: %s", res.StatusCode, string(body))
	}

	// 上传成功发送回调请求
	return d.request(http.MethodPost, "/callback/s3/"+u.SessionID+"/"+u.CallbackSecret, func(req *resty.Request) {
		req.SetBody("{}")
	}, nil)
}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Read the embedded XML error name to pinpoint the cause (InvalidPart / EntityTooSmall / NoSuchUpload)
  2. Restart the upload so parts and ETags remain consistent end-to-end
  3. Ensure every non-final part is at least 5 MiB (increase chunk size)
  4. Validate the server's S3 credentials and session before large uploads
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-flight: validate the ETag list matches the planned part count before completing
if len(etags) != expectedPartCount {
    return fmt.Errorf("incomplete part list (%d/%d); aborting complete", len(etags), expectedPartCount)
}

Try / catch

if err := d.completeUpload(...); err != nil {
    if strings.Contains(err.Error(), "up status:") {
        // parse the embedded XML: NoSuchUpload/InvalidPart -> restart upload;
        // EntityTooSmall -> raise chunk size; otherwise surface to user
    }
}

Prevention

When it happens

Trigger: S3 rejecting the complete-multipart-upload call: InvalidPart (part/ETag list desynced after mid-upload retries), EntityTooSmall, NoSuchUpload (expired session), or request signature issues — the XML detail is included verbatim in the error.

Common situations: Retry-induced ETag mismatch between uploaded parts and the complete request; last part below S3 minimum size; session expiry on very long uploads; stricter S3-compatible backends.

Related errors


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