transloadit/uppy · warning · Error
No key returned
Error message
No key returned
What it means
The preauth route requires a non-empty string providerName path parameter. This 400 is returned when the provider segment is missing or empty in the URL.
Source
Thrown at packages/@uppy/aws-s3/src/s3-client/CompanionS3.ts:113
if (typeof fileType !== 'string') {
throw new TypeError(`${C.ERROR_PREFIX}fileType must be a string`)
}
const method = 'POST'
const response = await this._fetch('/multipart', {
method,
body: JSON.stringify({ filename: keyIn, metadata, type: fileType }),
headers: { 'content-type': 'application/json' },
signal,
})
const {
key,
uploadId,
}: { key?: string; uploadId?: string; bucket?: string } =
await response.json()
if (uploadId == null) throw new Error('No uploadId returned')
if (key == null) throw new Error('No key returned')
return { uploadId, key }
}
public override async uploadPart({
key,
uploadId,
data,
partNumber,
onProgress,
signal,
}: IT.UploadPartParams) {
const response = await this._fetch(
`/multipart/${encodeURIComponent(uploadId)}/${encodeURIComponent(partNumber)}?${new URLSearchParams({ key })}`,
{
method: 'GET',
signal,
},View on GitHub (pinned to 5d4dedd02a)
Solutions
- Include the provider name in the path, e.g. /companion/url/preauth
- Verify the provider variable is defined before building the URL
- Check proxy path rewriting
Example fix
// before
fetch(`${companionUrl}/preauth`, ...)
// after
fetch(`${companionUrl}/${providerName}/preauth`, ...) Defensive patterns
Strategy: validation
Validate before calling
if (!providerName) throw new Error('provider name required for preauth URL')
await fetch(`${companionUrl}/${encodeURIComponent(providerName)}/preauth`, ...) Type guard
const isNonEmptyString = (s: unknown): s is string => typeof s === 'string' && s.length > 0
Prevention
- Validate dynamic path segments before fetch
- Centralize Companion URL construction in one helper
When it happens
Trigger: Calling /preauth without a provider segment, or with an empty segment (//preauth); constructing the URL from an undefined provider variable.
Common situations: Frontend builds the preauth URL from a dynamic provider value that is undefined at runtime; route mounted under a path prefix that gets stripped by a proxy.
Related errors
- Missing S3 object key for aborting upload
- No uploadId returned
- AbortError
- Missing S3 object key for resuming upload
- Missing S3 object key for uploading part
AI-assisted analysis of transloadit/uppy@5d4dedd02a (2026-08-28).
Data as JSON: /api/errors/28b15ad26eb875ce.
Report an issue: GitHub.