Web Messaging SDK: Handling file uploads with custom MIME types

We’re trying to allow customers to upload PDFs and images via the Web Messaging SDK on our public-facing site. The default config seems to work for basic images, but we’re hitting a wall with anything larger than a few megabytes or non-standard image formats like WebP.

I’ve been digging through the documentation and the genesys-cloud-messaging-sdk npm package, but I can’t find a clear way to override the default accepted MIME types or increase the file size limit beyond what the platform enforces server-side.

Here’s the basic initialization I’m using in the frontend:

const messenger = new Messenger({
 appId: 'my-app-id',
 region: 'us-east-1',
 config: {
 // Tried adding this but it seems to be ignored by the SDK
 fileUpload: {
 allowedTypes: ['application/pdf', 'image/webp'],
 maxSizeMB: 10
 }
 }
});

When a user tries to upload a 5MB PDF, the SDK throws a validation error before it even hits the /api/v2/conversations/webchat/messages endpoint. It says File type not allowed.

Is there a server-side setting in Genesys Cloud that controls these limits, or do I need to bypass the SDK’s built-in uploader and handle the multipart POST request directly to the Guest API? I’d rather not roll my own uploader if the SDK supports it, but the docs are pretty sparse on customization options here.