Skip to content

Unable to download full image / document content #643

@GDB4J

Description

@GDB4J

Hi,

I'm using version 0.0.10 (java 21)
And trying to send a image message to a contact

my code:

        var chat = whatsAppApi.store()
            .findChatByName("contactname")
            .orElseThrow(() -> new NoSuchElementException("Chat does not exist!"));
        var media = Files.readAllBytes(Path.of("C:\\whatsapp\\test.jpg"));
        var imageMessageBuilder = new ImageMessageSimpleBuilder() // Create a new image message builder
            .media(media) // Set the image of this message
            .mimeType("image/jpeg")
            .caption("test image");
        var image = imageMessageBuilder.build();
        whatsAppApi.sendMessage(chat,image).join();

I am (the contactname) receiving the image in a preview status: (preview seems correct)
Image

But it's unable to download the full image itself.
When i try to download i got the message (translated)
Unable to download image. Please try again. Turn off Wi-Fi or VPN, or connect to a different Wi-Fi network if the issue persists.

I have also tested this with the DocumentMessageSimpleBuilder, same behavior. I'm able to retrieve the message but unable to actual download the document itself.

Am i missing something here?

Thanks for helping me out of this!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions