Evolution + Chatwoot + Whatsapp Cloud API | Sending media files not working
Welcome!
- [x] Yes, I have searched for similar issues on GitHub and found none.
What did you do?
Hello,
I have a correctly configured instance of Evolution and Chatwood, all is working and I can send and receive messages, and also receive media files from the chats.
But when I try to upload a media file, it shown up on Chatwood, but it fails in the Evolution API part.
This is the generated log when I try to upload a file:
[Evolution API] [Whatsapp Business] v2.2.3 198 - Wed Apr 02 2025 09:08:52 ERROR [ChannelStartupService] [object] TypeError: Cannot read properties of undefined (reading 'name') at FormData._getContentDisposition (/evolution/node_modules/form-data/lib/form_data.js:227:40) at FormData._multiPartHeader (/evolution/node_modules/form-data/lib/form_data.js:178:33) at FormData.append (/evolution/node_modules/form-data/lib/form_data.js:71:21) at ls.getIdMedia (/evolution/dist/main.js:221:1700) at ls.prepareMediaMessage (/evolution/dist/main.js:221:2432) at ls.mediaMessage (/evolution/dist/main.js:221:2648) at Re.sendAttachment (/evolution/dist/main.js:82:10618) at Re.receiveWebhook (/evolution/dist/main.js:84:243) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fi.dataValidate (/evolution/dist/main.js:286:62716)
Chatwoot seems to be correctly uploading the file (it shown up in the UI etc) but when it comes to Evolution API, it fails sending the media back to the Whatsapp Cloud API
Any help would be appreciated
What did you expect?
The file being sent to Whatsapp Cloud API
What did you observe instead of what you expected?
Error uploading the file
Screenshots/Videos
Which version of the API are you using?
2.2.3
What is your environment?
Docker
Other environment specifications
No response
If applicable, paste the log output
[Evolution API] [Whatsapp Business] v2.2.3 198 - Wed Apr 02 2025 09:08:52 ERROR [ChannelStartupService] [object] TypeError: Cannot read properties of undefined (reading 'name') at FormData._getContentDisposition (/evolution/node_modules/form-data/lib/form_data.js:227:40) at FormData._multiPartHeader (/evolution/node_modules/form-data/lib/form_data.js:178:33) at FormData.append (/evolution/node_modules/form-data/lib/form_data.js:71:21) at ls.getIdMedia (/evolution/dist/main.js:221:1700) at ls.prepareMediaMessage (/evolution/dist/main.js:221:2432) at ls.mediaMessage (/evolution/dist/main.js:221:2648) at Re.sendAttachment (/evolution/dist/main.js:82:10618) at Re.receiveWebhook (/evolution/dist/main.js:84:243) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async fi.dataValidate (/evolution/dist/main.js:286:62716)
Additional Notes
No response
Same here
Same here
Same here
aqui igual
Help!
this was the issue, guys whatsapp.business.service.ts file
obviously after changing that, you have to rebuild/restart
this was the issue, guys whatsapp.business.service.ts file
obviously after changing that, you have to rebuild/restart
Where is the issue? Can you explain?
this was the issue, guys whatsapp.business.service.ts file
obviously after changing that, you have to rebuild/restart
That in fact seems to be wrong, but I changed it and I get the same error, it occurs before calling the media endpoint when its preparing the form data (undefined "name")
It seems that Evolution is correctly receiving the chatwoot webhook api call, but something get wrong when it tries to get the data from the media file.
i can send 200x200 resolution ok, but when i try to send image with 1000x600 resolution, this same error occurs.
i can send 200x200 resolution ok, but when i try to send image with 1000x600 resolution, this same error occurs.
WTF! It couldn't be more random!
#1475
UP! same here