gitroomhq/postiz-app · error · Error
Unsupported storage provider: ${provider}
Error message
Unsupported storage provider: ${provider} What it means
getUppyUploadPlugin maps the configured storage provider to an Uppy plugin and throws for any provider string without a case. It's a frontend configuration error: STORAGE_PROVIDER (or equivalent env) doesn't match the supported set (e.g. 'cloudflare'/'s3'/'local' depending on the switch).
Source
Thrown at libraries/react-shared-libraries/src/helpers/uppy.upload.ts:106
completeMultipartUpload: (file: any, props: any) =>
fetchUploadApiEndpoint(fetch, 'complete-multipart-upload', {
file,
...props,
}),
},
};
case 'local':
return {
plugin: XHRUpload,
options: {
endpoint: `${backendUrl}/media/upload-server`,
withCredentials: true,
},
};
// Add more cases for other cloud providers
default:
throw new Error(`Unsupported storage provider: ${provider}`);
}
};
View on GitHub (pinned to 0f1647f749)
Solutions
- Check the exact provider string passed in (log it) and fix the env var value to a supported one
- If the provider is genuinely supported server-side, add a matching case in getUppyUploadPlugin
- Verify the env var is present at frontend build time (Vite requires it at build, not runtime)
- Guard upstream: validate the provider against a known list before calling getUppyUploadPlugin
Example fix
// before
throw new Error(`Unsupported storage provider: ${provider}`);
// after: validate before use + clearer default
const SUPPORTED = ['local', 'cloudflare', 's3'] as const;
if (!SUPPORTED.includes(provider)) {
throw new Error(
`Unsupported storage provider: ${provider}. Supported: ${SUPPORTED.join(', ')} (check STORAGE_PROVIDER)`
);
} Defensive patterns
Strategy: type-guard
Validate before calling
const SUPPORTED_PROVIDERS = ['local', 'cloudflare', 's3'] as const; const isSupportedProvider = (p: unknown): p is typeof SUPPORTED_PROVIDERS[number] => SUPPORTED_PROVIDERS.includes(p as any);
Type guard
const isSupportedProvider = (p: unknown): p is 'local' | 'cloudflare' | 's3' => ['local','cloudflare','s3'].includes(p as string);
Try / catch
null
Prevention
- Validate STORAGE_PROVIDER at build time
- Fail fast at app startup on invalid provider config
- Add the frontend case whenever a backend storage backend is added
When it happens
Trigger: Building the Uppy uploader with a provider value that has no switch case: typo ('Cloudflare'), unsupported provider ('azure'), or undefined/empty string falling through to default.
Common situations: Misconfigured STORAGE_PROVIDER env var in the frontend build; deploying a new backend storage backend without adding the frontend case; env var name change between versions leaving the value undefined.
Related errors
- Integration not allowed
- Failed to fetch URL
- File is too large.
- Unsupported file type.
- All media must be uploaded through our upload API route and
AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27).
Data as JSON: /api/errors/ac746c77b06a3feb.
Report an issue: GitHub.