AlistGo/alist · error

%+v

Error message

%+v

What it means

Raised at the end of AliDrive.Put when, after the complete call, the response's file_id does not match the created file_id (and the pre-hash did not match): the server finalized a different/failed upload, so the whole response JSON is dumped into the error for diagnosis.

Solutions

  1. Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at drivers/aliyundrive/driver.go:328 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at drivers/aliyundrive/driver.go:328

		if count > 0 {
			up(float64(i) * 100 / float64(count))
		}
	}
	var resp2 base.Json
	_, err, e = d.request("https://api.alipan.com/v2/file/complete", http.MethodPost, func(req *resty.Request) {
		req.SetBody(base.Json{
			"drive_id":  d.DriveId,
			"file_id":   resp.FileId,
			"upload_id": resp.UploadId,
		})
	}, &resp2)
	if err != nil && e.Code != "PreHashMatched" {
		return err
	}
	if resp2["file_id"] == resp.FileId {
		return nil
	}
	return fmt.Errorf("%+v", resp2)
}

func (d *AliDrive) Other(ctx context.Context, args model.OtherArgs) (interface{}, error) {
	var resp base.Json
	var url string
	data := base.Json{
		"drive_id": d.DriveId,
		"file_id":  args.Obj.GetID(),
	}
	switch args.Method {
	case "doc_preview":
		url = "https://api.alipan.com/v2/file/get_office_preview_url"
		data["access_token"] = d.AccessToken
	case "video_preview":
		url = "https://api.alipan.com/v2/file/get_video_preview_play_info"
		data["category"] = "live_transcoding"
		data["url_expire_sec"] = 14400
	default:

View on GitHub (pinned to 843d9dc814)