-
Notifications
You must be signed in to change notification settings - Fork 106
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
need help using tarker with "Image must be in png or jpeg and base64 encoded in embedded format" #53
Comments
First you have to read the file in binary to a variable. Then you have to remove the \n line breaks from that variable. The result is the base64 encoding of the file. |
You are a genius lordcer0! the \n thing did the trick! however, i can't see the thumbnail before i download the image in my phone, the "preview".. did you manage to fix it? unfortunately, my robot is not meant to download audios i receive so i can't give you any information about.. i will let you know if i incorporate that stuff to my project |
If you correctly set the mimetype when sending, for example image/jpeg, a thumbnail of the image is displayed in WhatsApp before opening it. |
in the API references https://github.com/asternic/wuzapi/blob/main/API.md#send-image-message the image/jpeg is already in the http request '{"Phone":"5491155554444","Caption":"Look at this", "Image":"data:image/jpeg;base64,iVBORw0KGgoAAAANSU..."}', are you talking about something else? on the other hand, regarding your question, my project runs on android tasker app and my webhook alert does not trigger when an audio is received (i checked).. why dont you let the audios auto-download and grab them from the downloaded folder? |
Exactly, by sending the image encoded in base64 and sending the mimetype correctly, it already shows the thumbnail in the received message. |
unfortunately it does not shows the blurry image before the image is opened :( yes, i run wuzapi on android with termux! |
It's not the platform, it's because wuzapi doesn't have code to set thumbnail preview here - Lines 865 to 874 in 9987988
You need to manually add the code to set the thumbnail preview from here - tulir/whatsmeow#204 (comment) Also, to properly see the effect of not setting thumbnails, you need to turn off media auto-download from WhatsApp Chat settings. All images/videos sent from wuzapi will now appear blurry or blank until manually downloaded. |
thank you for your explanation. unfortunately, this is way above my understanding and my knowledge, i will end up using without the blurry effect.. i was using another github repo https://github.com/HunterXProgrammer/Tasker-mdtest-v4 but unfortunately -until now- it is not under mantaince by the developer |
Please review the commit 4c2ec6e for image sending.... If it works, I can do someting similar to video messages. |
Hi everyone
I've been trying to convert a jpeg image to send it through whastapp (using tasker in android).. unfortunately, i tried many ways of converting but never succeded, does anyone have an example o explanation more detailed as a hint?
thanks in advance
hernan
The text was updated successfully, but these errors were encountered: