[GH-ISSUE #9] Send document pdf #9

Open
opened 2026-02-27 10:25:21 +03:00 by kerem · 6 comments
Owner

Originally created by @sumanmanna6111 on GitHub (Jul 16, 2023).
Original GitHub issue: https://github.com/mimamch/wa-multi-session/issues/9

Add this features

Originally created by @sumanmanna6111 on GitHub (Jul 16, 2023). Original GitHub issue: https://github.com/mimamch/wa-multi-session/issues/9 Add this features
Author
Owner

@mimamch commented on GitHub (Jul 16, 2023):

Thank u for asking,
We have created this feature last week.

Check this function or see readme documentation
const filename = "mydocument.docx"; const document = fs.readFileSync(filename); // return Buffer const send = await whatsapp.sendDocument({ sessionId: "session1", to: "6281234567890", filename: filename, media: document, text: "Hei, Check this Document", });

<!-- gh-comment-id:1637084381 --> @mimamch commented on GitHub (Jul 16, 2023): Thank u for asking, We have created this feature last week. Check this function or see readme documentation ` const filename = "mydocument.docx"; const document = fs.readFileSync(filename); // return Buffer const send = await whatsapp.sendDocument({ sessionId: "session1", to: "6281234567890", filename: filename, media: document, text: "Hei, Check this Document", }); `
Author
Owner

@sumanmanna6111 commented on GitHub (Aug 12, 2023):

pdf not sending properly

<!-- gh-comment-id:1675958391 --> @sumanmanna6111 commented on GitHub (Aug 12, 2023): pdf not sending properly
Author
Owner

@mimamch commented on GitHub (Aug 12, 2023):

Can you give more spesific about "pdf not sending"??????

<!-- gh-comment-id:1675973994 --> @mimamch commented on GitHub (Aug 12, 2023): Can you give more spesific about "pdf not sending"??????
Author
Owner

@sumanmanna6111 commented on GitHub (Aug 13, 2023):

  1. pdf not sending through direct url.
  2. and i also tried this code
  3. const filename = "mydocument.docx";
    const document = fs.readFileSync(filename); // return Buffer
    const send = await whatsapp.sendDocument({
    sessionId: "session1",
    to: "6281234567890",
    filename: filename,
    media: document,
    text: "Hei, Check this Document",
    });
    but with this code sending a document of 64kb but it not a pdf file .
    its send a unsupported file.
<!-- gh-comment-id:1676228506 --> @sumanmanna6111 commented on GitHub (Aug 13, 2023): 1. pdf not sending through direct url. 2. and i also tried this code 3. const filename = "mydocument.docx"; const document = fs.readFileSync(filename); // return Buffer const send = await whatsapp.sendDocument({ sessionId: "session1", to: "6281234567890", filename: filename, media: document, text: "Hei, Check this Document", }); but with this code sending a document of 64kb but it not a pdf file . its send a unsupported file.
Author
Owner

@mimamch commented on GitHub (Aug 13, 2023):

Can you give screenshot of code n files you sent, and the error

<!-- gh-comment-id:1676229450 --> @mimamch commented on GitHub (Aug 13, 2023): Can you give screenshot of code n files you sent, and the error
Author
Owner

@sumanmanna6111 commented on GitHub (Aug 13, 2023):

after update wa-multi-session now its working file.
Can you add message seen, delivered status

<!-- gh-comment-id:1676239217 --> @sumanmanna6111 commented on GitHub (Aug 13, 2023): after update wa-multi-session now its working file. Can you add message seen, delivered status
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wa-multi-session-mimamch#9
No description provided.