transloadit/uppy · error · ValidationError
no destination specified
Error message
no destination specified
What it means
Thrown by Companion's Uploader.validateOptions when a non-s3Multipart upload is created without any destination. Uploader needs somewhere to POST/PUT the file: either `options.endpoint` or `options.uploadUrl` must be set. s3Multipart uploads are exempt because the destination is derived from the server's S3 configuration.
Source
Thrown at packages/@uppy/companion/src/server/Uploader.ts:153
// validate headers (optional)
if (options.headers != null && typeof options.headers !== 'object') {
throw new ValidationError('headers must be an object')
}
// validate protocol (optional)
if (
options.protocol &&
!Object.values(PROTOCOLS).includes(options.protocol)
) {
throw new ValidationError('unsupported protocol specified')
}
// s3 uploads don't require upload destination
// validation, because the destination is determined
// by the server's s3 config
if (options.protocol !== PROTOCOLS.s3Multipart) {
if (!options.endpoint && !options.uploadUrl) {
throw new ValidationError('no destination specified')
}
const validateUrl = (url: string | undefined): void => {
if (url == null) return
const validatorOpts = { require_protocol: true, require_tld: false }
if (!validator.isURL(url, validatorOpts)) {
throw new ValidationError('invalid destination url')
}
const allowedUrls = options.companionOptions.uploadUrls
if (allowedUrls && !hasMatch(url, allowedUrls)) {
throw new ValidationError(
'upload destination does not match any allowed destinations',
)
}
}
;[options.endpoint, options.uploadUrl].forEach(validateUrl)View on GitHub (pinned to 5d4dedd02a)
Solutions
- Set `endpoint` (or `uploadUrl`) in the upload request / Uploader options, e.g. endpoint: 'https://example.com/upload'
- If you intend S3, pass protocol: 's3Multipart' AND configure S3 keys on the Companion server so the s3 branch is valid
- Verify the client's companionOptions and that companion-client forwards the destination field
Example fix
// before
await companionClient.upload({ protocol: 'multipart' }) // no destination
// after
await companionClient.upload({ protocol: 'multipart', endpoint: 'https://my-server.example.com/receive' }) Defensive patterns
Strategy: validation
Validate before calling
const opts = { protocol: 'multipart', endpoint: undefined, uploadUrl: undefined }
if (opts.protocol !== 's3Multipart' && !opts.endpoint && !opts.uploadUrl) {
throw new Error('client-side precheck: no destination specified')
} Type guard
const hasUploadDestination = (o: { endpoint?: unknown; uploadUrl?: unknown; protocol?: string }) =>
o.protocol === 's3Multipart' || typeof o.endpoint === 'string' || typeof o.uploadUrl === 'string'; Try / catch
try { await uploader.upload() } catch (err) {
if (err instanceof ValidationError && err.message === 'no destination specified') { /* prompt user/config for destination */ }
} Prevention
- Always set endpoint or uploadUrl for multipart/tus uploads
- Default the endpoint in one config module so every call site inherits it
When it happens
Trigger: POSTing to /uppy/upload with protocol 'multipart' or 'tus' but omitting both `endpoint` and `uploadUrl` fields in the request body; or constructing `new Uploader({...})` server-side without either property (and not using PROTOCOLS.s3Multipart).
Common situations: Client-side misconfiguration where the Uppy companion-client is not given a companionUrl/endpoint, a typo like `endpont`, or assuming S3 mode while the server resolved protocol to multipart/tus.
Related errors
- unsupported HTTP METHOD specified
- maxFileSize exceeded
- fieldname must be a string
- metadata must be an object
- headers must be an object
AI-assisted analysis of transloadit/uppy@5d4dedd02a (2026-08-28).
Data as JSON: /api/errors/8ebb5a3ece3f85b6.
Report an issue: GitHub.