baileys-api icon indicating copy to clipboard operation
baileys-api copied to clipboard

Impossible to send local images

Open lascimmia opened this issue 3 years ago • 2 comments

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?

lascimmia avatar Sep 09 '22 14:09 lascimmia

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

gabrielnm123 avatar Sep 10 '22 00:09 gabrielnm123

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

lascimmia avatar Sep 13 '22 11:09 lascimmia

try to use docker with linux image

gabrielnm123 avatar Oct 17 '22 13:10 gabrielnm123

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

Were you successful in uploading local files?

pedrodamiani21 avatar Oct 26 '22 14:10 pedrodamiani21

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?

gabrielnm123 avatar Oct 26 '22 16:10 gabrielnm123

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

pedrodamiani21 avatar Oct 26 '22 16:10 pedrodamiani21

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 avatar Oct 26 '22 17:10 gabrielnm123

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?

gabrielnm123 avatar Oct 26 '22 17:10 gabrielnm123

Could you try it using the latest version?

ookamiiixd avatar Jan 07 '23 12:01 ookamiiixd

Closing this due to inactivity

ookamiiixd avatar Jan 10 '23 05:01 ookamiiixd