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

Nao esta enviando videos #3010

Closed
1 task done
ojauumdev opened this issue May 5, 2024 · 1 comment
Closed
1 task done

Nao esta enviando videos #3010

ojauumdev opened this issue May 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ojauumdev
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Estou tentando enviar video mas nao esta funcionando.

app.post('/enviar-midia', async (req, res) => {
try {
const { numero, legenda, arquivo } = req.body;
const numeroincluso = numero + '@c.us';
const media = await MessageMedia.fromUrl(arquivo, { caption: legenda, unsafeMime: true });
await client.sendMessage(numeroincluso, media);

    res.json({ success: true, message: 'Mídia com legenda enviada com sucesso' });
} catch (error) {
    console.error('Erro ao enviar mídia com legenda:', error);
    res.status(500).json({ success: false, message: 'Erro ao enviar mídia com legenda' });
}

});

Se eu enviar uma imagem .jpg .jpeg. .png funciona porem videos em geral nao funciona, nao é enviado!

Expected behavior

Estou tentando enviar video mas nao esta funcionando.

app.post('/enviar-midia', async (req, res) => {
try {
const { numero, legenda, arquivo } = req.body;
const numeroincluso = numero + '@c.us';
const media = await MessageMedia.fromUrl(arquivo, { caption: legenda, unsafeMime: true });
await client.sendMessage(numeroincluso, media);

    res.json({ success: true, message: 'Mídia com legenda enviada com sucesso' });
} catch (error) {
    console.error('Erro ao enviar mídia com legenda:', error);
    res.status(500).json({ success: false, message: 'Erro ao enviar mídia com legenda' });
}

});

Se eu enviar uma imagem .jpg .jpeg. .png funciona porem videos em geral nao funciona, nao é enviado!

Steps to Reproduce the Bug or Issue

Estou tentando enviar video mas nao esta funcionando.

app.post('/enviar-midia', async (req, res) => {
try {
const { numero, legenda, arquivo } = req.body;
const numeroincluso = numero + '@c.us';
const media = await MessageMedia.fromUrl(arquivo, { caption: legenda, unsafeMime: true });
await client.sendMessage(numeroincluso, media);

    res.json({ success: true, message: 'Mídia com legenda enviada com sucesso' });
} catch (error) {
    console.error('Erro ao enviar mídia com legenda:', error);
    res.status(500).json({ success: false, message: 'Erro ao enviar mídia com legenda' });
}

});

Se eu enviar uma imagem .jpg .jpeg. .png funciona porem videos em geral nao funciona, nao é enviado!

Relevant Code

No response

Browser Type

Google Chrome

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

No, I am not using Multi Device

Environment

OS: Windows
Phone OS: IOS
Node Version: 18

Additional context

No response

@ojauumdev ojauumdev added the bug Something isn't working label May 5, 2024
@themazim
Copy link

themazim commented May 5, 2024

#3002

@alechkos alechkos marked this as a duplicate of #3002 May 5, 2024
@alechkos alechkos closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2024
Repository owner locked and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants