Skip to Content

URL fetching (__qaFileUrl)

FetchFileUrlOptions

FieldDescription
allowedHostsExact hostnames (case-insensitive). Entries starting with . match suffixes (e.g. .amazonaws.com).
maxDownloadBytesHard cap on downloaded bytes.
timeoutMsPer-request timeout.
maxRedirectsOptional redirect cap (default 3).
allowHttpWhen true, allows http: URLs (dev only; default false).

isHostnameAllowed(hostname, allowedHosts)

Utility for preflight checks in custom gateways.

fetchFileUrl(urlString, options)

Performs an HTTPS GET (or HTTP when explicitly allowed), enforces hostname allowlist, size cap, timeout, and redirect rules. Returns { buffer, contentType, filename }.

Throws descriptive errors such as FILE_URL_FETCH_FAILED when the host is disallowed or limits are exceeded.

Bootstrap wiring

Pass the same options object (or a superset) to bootstrap / transports; only the public slice is copied onto catalog payloads via publicFileUrlCatalogSlice (see Uploads overview).

See also