We’re hitting a wall with file uploads in our custom Web Messaging implementation. The client-side code uses the standard Genesys Cloud REST endpoint for attachment creation, but we’re getting inconsistent 413 errors depending on the file type.
Here’s the flow: we get an auth token, create the attachment via POST /api/v2/conversations/messaging/attachments, and then send the message with the attachment ID. The error happens on the attachment creation step for files over 10MB, even though the docs suggest a 25MB limit for some contexts.
const formData = new FormData();
formData.append('file', fileInput.files[0]);
const response = await fetch(`https://${env}.mypurecloud.com/api/v2/conversations/messaging/attachments`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`
},
body: formData
});
We’re seeing this fail for PDFs and images. The response body is empty. Is there a specific MIME type whitelist we need to check? Or is the size limit strictly tied to the organization’s tier? We’re on a standard plan. No useful logs from New Relic on the backend since the request fails at the API gateway level. Anyone have a working snippet for handling large attachments? We’ve tried chunking but the API doesn’t seem to support resumable uploads. Just looking for the exact size and MIME constraints. The docs are vague on this. We need to validate client-side before sending to avoid these 413s.