AlistGo/alist · error
streamtape upload failed: http %d
Error message
streamtape upload failed: http %d
What it means
After obtaining a Streamtape upload slot and POSTing the file to the returned upload URL, the response status was >= 400. The status code is printed. Streamtape's upload endpoint is separate from its API and returns its own errors (invalid upload slot, size limit, server capacity).
Source
Thrown at drivers/streamtape/driver.go:356
var uploadURL uploadURLResult
if err := d.callAPI(ctx, "/file/ul", params, &uploadURL); err != nil {
return nil, err
}
reader := driver.NewLimitedUploadStream(ctx, &driver.ReaderUpdatingProgress{
Reader: file,
UpdateProgress: up,
})
res, err := base.RestyClient.R().
SetContext(ctx).
SetFileReader("file1", file.GetName(), reader).
Post(uploadURL.URL)
if err != nil {
return nil, err
}
if res.StatusCode() >= http.StatusBadRequest {
return nil, fmt.Errorf("streamtape upload failed: http %d", res.StatusCode())
}
uploadedID := extractFileIDFromUploadBody(res.Body())
if uploadedID == "" {
list, listErr := d.List(ctx, &model.Object{ID: encodeFolderID(folderID), IsFolder: true}, model.ListArgs{})
if listErr == nil {
for _, obj := range list {
if obj.IsDir() {
continue
}
if obj.GetName() == file.GetName() && (file.GetSize() <= 0 || obj.GetSize() == file.GetSize()) {
return obj, nil
}
}
}
return &model.Object{
Name: file.GetName(),
Size: file.GetSize(),View on GitHub (pinned to 843d9dc814)
Solutions
- Retry the upload from scratch — a fresh upload URL is fetched each attempt
- Check the file size against Streamtape's current limits for the account tier
- For large files on slow links, verify bandwidth/stability first, since slot expiry is time-based
- If 5xx persists, check Streamtape status pages and retry later
Defensive patterns
Strategy: retry
Validate before calling
// check size against Streamtape limits before uploading (free tier: no file > ~limit)
if streamtapeMaxSize > 0 && file.GetSize() > streamtapeMaxSize {
return fmt.Errorf("file exceeds Streamtape size limit")
} Try / catch
if err != nil {
var code int
if n, _ := fmt.Sscanf(err.Error(), "streamtape upload failed: http %d", &code); n == 1 {
if code >= 500 || code == 429 { return retryUploadWithFreshURL() }
}
return err
} Prevention
- Retry uploads from scratch — each attempt gets a fresh presigned URL
- Verify file size against the account tier's limit before starting
- Ensure stable bandwidth for large files; upload slots are time-limited
When it happens
Trigger: The presigned upload URL expired before the POST completed; file exceeds Streamtape's maximum size for the account; the upload slot was consumed by a previous attempt; Streamtape upload servers returning 5xx under load.
Common situations: Slow upstream connections letting the slot expire mid-upload; retrying an upload reusing a stale URL; free-tier size limits; Streamtape upload-node outages.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/33fc7c99ced77e0a.
Report an issue: GitHub.