Whatsapp-web.js: Cannot send image

Created on 15 Apr 2020  路  5Comments  路  Source: pedroslopez/whatsapp-web.js

How can i send media ?

I tried

var media_data = "/9j/...";
var media_mimetype = "image/jpeg";
var media = new MessageMedia(media_mimetype, media_data, 'filename');

client.sendMessage(msg.from, media, { caption: 'Here\'s your requested media.' });

I gets error

Evaluation failed: TypeError: Cannot read property 'uploadPromise'

Most helpful comment

Hi @ocracy

What version of the library are you using?

I have updated to the latest one. My problem is gone.

All 5 comments

Hi @ocracy

What version of the library are you using?

Same here, i'm using 1.2.5 version

Hi @ocracy

What version of the library are you using?

I have updated to the latest one. My problem is gone.

Same here, i'm using 1.2.5 version

Update the package

This issue is due to a change in WhatsApp Web and was fixed in later versions. If anyone reads this and is having the issue, please update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicolascav picture nicolascav  路  6Comments

tarikhagustia picture tarikhagustia  路  10Comments

ngekoding picture ngekoding  路  5Comments

iriobf picture iriobf  路  4Comments

parthibd picture parthibd  路  4Comments