From d87d7c07759254b818ae29267ced0a16e60c031c Mon Sep 17 00:00:00 2001 From: Alan Cezar Date: Thu, 14 Nov 2024 09:07:57 -0300 Subject: [PATCH] fixed image mime type --- src/api/integrations/channel/meta/whatsapp.business.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/integrations/channel/meta/whatsapp.business.service.ts b/src/api/integrations/channel/meta/whatsapp.business.service.ts index 65c87961..1b1fada6 100644 --- a/src/api/integrations/channel/meta/whatsapp.business.service.ts +++ b/src/api/integrations/channel/meta/whatsapp.business.service.ts @@ -339,7 +339,7 @@ export class BusinessStartupService extends ChannelStartupService { ? 'audio' : 'video'; - const mimetype = result.headers['content-type']; + const mimetype = result.data?.mime_type || result.headers['content-type']; const contentDisposition = result.headers['content-disposition']; let fileName = `${message.messages[0].id}.${mimetype.split('/')[1]}`;