AlistGo/alist · error

[terabox] failed to precreate file, errno: %d

Error message

[terabox] failed to precreate file, errno: %d

What it means

Error "[terabox] failed to precreate file, errno: %d" thrown in AlistGo/alist.

Source

Thrown at drivers/terabox/driver.go:174

	data := map[string]string{
		"path":                  rawPath,
		"autoinit":              "1",
		"target_path":           dstDir.GetPath(),
		"block_list":            precreateBlockListStr,
		"local_mtime":           strconv.FormatInt(stream.ModTime().Unix(), 10),
		"file_limit_switch_v34": "true",
	}
	var precreateResp PrecreateResp
	log.Debugln(data)
	res, err := d.post_form("/api/precreate", nil, data, &precreateResp)
	if err != nil {
		return err
	}
	log.Debugf("%+v", precreateResp)
	if precreateResp.Errno != 0 {
		log.Debugln(string(res))
		return fmt.Errorf("[terabox] failed to precreate file, errno: %d", precreateResp.Errno)
	}
	if precreateResp.ReturnType == 2 {
		return nil
	}

	// upload chunks
	tempFile, err := stream.CacheFullInTempFile()
	if err != nil {
		return err
	}

	params := map[string]string{
		"method":     "upload",
		"path":       path,
		"uploadid":   precreateResp.Uploadid,
		"app_id":     "250528",
		"web":        "1",
		"channel":    "dubox",

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry.

When it happens

Trigger: Thrown at drivers/terabox/driver.go:174 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/527fbe66254bb2cc. Report an issue: GitHub.