Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image not sent #6

Closed
thiagootero opened this issue Aug 26, 2020 · 4 comments
Closed

Image not sent #6

thiagootero opened this issue Aug 26, 2020 · 4 comments
Labels
question Further information is requested

Comments

@thiagootero
Copy link

Hello friends. Until yesterday I was able to send an image using the code:

const media = MessageMedia.fromFilePath(path.resolve('cardapio1.jpeg'));
client.sendMessage(msg.from, media, { caption: '' || "" });

Today it does not send anymore and does not give any error on the console, it simply does not send and does not point out errors. What can it be?
There is no mistake in the path or in the name of the image, I didn't change anything from yesterday, it just stopped.

@pranavms13
Copy link
Owner

I do not know why you are using '' || "" as caption.
Try :

const media = MessageMedia.fromFilePath(path.resolve('cardapio1.jpeg'));
client.sendMessage(msg.from, media, { caption: "" });

If it still doesn't work, please run npm update to update the whatsapp-web.js dependency and retry.

@pranavms13 pranavms13 added the question Further information is requested label Aug 26, 2020
@pranavms13
Copy link
Owner

pranavms13 commented Aug 26, 2020

Also, look into the following link for more info.
https://waguide.pedroslopez.me/features/handling-attachments#sending-local-files

@thiagootero
Copy link
Author

thiagootero commented Aug 27, 2020 via email

@pranavms13
Copy link
Owner

Currently, there's no support for running more than one instance of WhatsApp Web.
This may be possible when WhatsApp releases multi-device login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants