code-chat-br / whatsapp-api

CodeChat - WhatsApp Api
https://docs.codechat.dev
Apache License 2.0
659 stars 261 forks source link

File upload endpoint not working with base64 #63

Closed FelipeDeveloperFullStack closed 1 year ago

FelipeDeveloperFullStack commented 1 year ago

Hey guys

I'm trying to use the endpoint POST {{baseUrl}}/message/sendMedia/{{instance}}, but when passing the base64 of a .pdf file, it's not working. It's returning me the message: "Owned media must be a url".

What am I doing wrong? can anybody help me?

image image

jrCleber commented 1 year ago

What is your api version? If it is lower than v1.2.6, please update.

Access the route: http://localhost:8083/docs and correct your application.

FelipeDeveloperFullStack commented 1 year ago

@jrCleber

Thank you, it helped me a lot.

The version is the same, I had not updated it was the postman.json version, I updated it here and used the "/message/sendMediaFile" endpoint.

But, I don't know that I had the swagger by the "http://localhost:8083/docs" endpoint, they could later add it in the README.md it will help other devs, if not I can open a pull request to request this update. It will be very useful.

Thank you for your help.