AlistGo/alist · error
relative url without site url: %s
Error message
relative url without site url: %s
What it means
Error "relative url without site url: %s" thrown in AlistGo/alist.
Source
Thrown at drivers/strm/util.go:252
if link.MFile != nil {
defer link.MFile.Close()
return io.ReadAll(link.MFile)
}
if link.RangeReadCloser != nil {
rc, err := link.RangeReadCloser.RangeRead(ctx, http_range.Range{Length: -1})
if err == nil && rc != nil {
defer rc.Close()
return io.ReadAll(rc)
}
}
if link.URL == "" {
return nil, fmt.Errorf("empty link")
}
url := link.URL
if !strings.HasPrefix(url, "http://") && !strings.HasPrefix(url, "https://") {
api := common.GetApiUrl(nil)
if api == "" {
return nil, fmt.Errorf("relative url without site url: %s", url)
}
url = strings.TrimSuffix(api, "/") + url
}
res, err := base.RestyClient.R().SetContext(ctx).SetDoNotParseResponse(true).Get(url)
if err != nil {
return nil, err
}
defer res.RawBody().Close()
if res.StatusCode() >= http.StatusBadRequest {
return nil, fmt.Errorf("read url failed: status=%d", res.StatusCode())
}
return io.ReadAll(res.RawBody())
}
func (d *Strm) writeLocal(path string, payload []byte, mode string) error {
if mode == SaveLocalInsertMode && utils.Exists(path) {
return nil
}View on GitHub (pinned to 843d9dc814)
Solutions
- 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/strm/util.go:252 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/5062d25cd53f2481.
Report an issue: GitHub.