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

Send document pdf #9

Open
sumanmanna6111 opened this issue Jul 16, 2023 · 6 comments
Open

Send document pdf #9

sumanmanna6111 opened this issue Jul 16, 2023 · 6 comments
Labels
duplicate This issue or pull request already exists

Comments

@sumanmanna6111
Copy link

sumanmanna6111 commented Jul 16, 2023

Add this features

@mimamch
Copy link
Owner

mimamch commented 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", });

@mimamch mimamch added the duplicate This issue or pull request already exists label Jul 20, 2023
@sumanmanna6111
Copy link
Author

pdf not sending properly

@mimamch
Copy link
Owner

mimamch commented Aug 12, 2023

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

@sumanmanna6111
Copy link
Author

  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.

@mimamch
Copy link
Owner

mimamch commented Aug 13, 2023

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

@sumanmanna6111
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants