ookamiiixd / baileys-api

Simple WhatsApp REST API with multiple device support
MIT License
432 stars 328 forks source link

Impossible to send local images #91

Closed lascimmia closed 1 year ago

lascimmia commented 2 years ago

Thanks a lot for your great work! I'm not able to send local image in a message; I can only use a internet URL. Is it my fault or an issue?

gabrielnm123 commented 2 years ago

You have to put the file path in url, I will show you an example, I use linux and you must adapt to your operating system

curl --location -g --request POST 'localhost:8000/chats/send?id=test' \
--header 'Content-Type: application/json' \ --data-raw '{ "receiver": "123456789", "message": { "image": { "url": "/home/gabriel/Downloads/download.png" }, "caption": "My logo" } }'

Put the spaces correctly, it can make a difference so that an error does not occur

lascimmia commented 2 years ago

I'm on Windows, and writing the full path seems not working, the same as relative path

gabrielnm123 commented 1 year ago

try to use docker with linux image

pedrodamiani21 commented 1 year ago

I'm on Windows, and writing the full path seems not working, the same as relative path

Were you successful in uploading local files?

gabrielnm123 commented 1 year ago

I'm on Windows, and writing the full path seems not working, the same as relative path

Were you successful in uploading local files?

Yes You speak portuguese?

pedrodamiani21 commented 1 year ago

I'm on Windows, and writing the full path seems not working, the same as relative path

Were you successful in uploading local files?

Yes You speak portuguese?

yes

gabrielnm123 commented 1 year ago

I'm on Windows, and writing the full path seems not working, the same as relative path

Were you successful in uploading local files?

Yes You speak portuguese?

yes

Pois é Pedro, baixa os arquivos e utiliza o curl, ou outra tecnologia, pra fazer as requisições, mas primeiro executa o programa com o nodejs

gabrielnm123 commented 1 year ago

I'm on Windows, and writing the full path seems not working, the same as relative path

Were you successful in uploading local files?

Yes You speak portuguese?

yes

Pois é Pedro, baixa os arquivos e utiliza o curl, ou outra tecnologia, pra fazer as requisições, mas primeiro executa o programa com o nodejs

Essencial usar o Linux ou uma imagem docker, já tem um servidor?

ookamiiixd commented 1 year ago

Could you try it using the latest version?

ookamiiixd commented 1 year ago

Closing this due to inactivity