AlistGo/alist · error

complete upload of %s failed: %w

Error message

complete upload of %s failed: %w

What it means

Error "complete upload of %s failed: %w" thrown in AlistGo/alist.

Source

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

	for i := 0; i < completeMaxPolls; i++ {
		res, err := d.client.Upload.Complete(ctx, created.PreuploadID)
		switch {
		case err != nil:
			lastErr = err
		case res.Completed && res.FileID != 0:
			up(100)
			return uploadedObj(res.FileID, file, etag), nil
		default:
			lastErr = nil
		}
		select {
		case <-ctx.Done():
			return nil, ctx.Err()
		case <-time.After(completePollInterval):
		}
	}
	if lastErr != nil {
		return nil, fmt.Errorf("complete upload of %s failed: %w", file.GetName(), lastErr)
	}
	return nil, fmt.Errorf("complete upload of %s timed out while the server was merging the slices", file.GetName())
}

// uploadedObj describes the file the server created for an upload.
func uploadedObj(fileID int64, file model.FileStreamer, etag string) model.Obj {
	return &model.Object{
		ID:       strconv.FormatInt(fileID, 10),
		Name:     file.GetName(),
		Size:     file.GetSize(),
		Modified: time.Now(),
		Ctime:    time.Now(),
		HashInfo: utils.NewHashInfo(utils.MD5, etag),
	}
}

// uploadProgress accumulates the bytes uploaded by all concurrent slices and
// forwards the overall percentage. Reporting is serialized because the callback

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/123_open/upload.go:164 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/f60f64702d3d9bb8. Report an issue: GitHub.