AlistGo/alist · error

create upload of failed

Error message

create upload of %s failed: %w

What it means

Wraps the error from pan123 Upload.Create in Open123.Put, naming the file: the 123 open platform rejected the upload-creation request (quota, name, parent, or MD5 mismatch), so no upload session exists.

Solutions

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

Strategy: try-catch

When it happens

Trigger: Thrown at drivers/123_open/upload.go:60 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/ba5dfdf3703af63b. Report an issue: GitHub.

Appendix: source

Thrown at drivers/123_open/upload.go:60

	// the create call needs the whole file MD5; reuse the stream's own hash
	// when it has one, otherwise cache the stream and hash it on the way
	etag := file.GetHash().GetHash(utils.MD5)
	if len(etag) != utils.MD5.Width {
		_, etag, err = stream.CacheFullInTempFileAndHash(file, utils.MD5)
		if err != nil {
			return nil, fmt.Errorf("calculate md5 of %s failed: %w", file.GetName(), err)
		}
	}

	size := file.GetSize()
	created, err := d.client.Upload.Create(ctx, &pan123.UploadCreateRequest{
		ParentFileID: parentFileID,
		Filename:     file.GetName(),
		Etag:         etag,
		Size:         size,
	})
	if err != nil {
		return nil, fmt.Errorf("create upload of %s failed: %w", file.GetName(), err)
	}
	// instant upload: the server already holds this content
	if created.Reuse {
		up(100)
		return uploadedObj(created.FileID, file, etag), nil
	}
	if created.PreuploadID == "" {
		return nil, errors.New("the server returned no preuploadID")
	}

	servers := created.Servers
	if len(servers) == 0 {
		servers, err = d.client.Upload.Domains(ctx)
		if err != nil {
			return nil, fmt.Errorf("get upload domains failed: %w", err)
		}
	}
	if len(servers) == 0 {

View on GitHub (pinned to 843d9dc814)