Matrix is an open network for secure, decentralized communication. I run the Synapse implementation of the Matrix Homeserver on one of my hosts.
I would like to send messages using the client-server API to a specific matrix room. I use an access token and a room id to perform API calls. I can send text messages with the following curl command:
curl --header "Authorization: Bearer my_token" -X POST -d '{"msgtype":"m.text", "body":"my hello world messsage"}' "https://my_homeserver_url/_matrix/client/r0/rooms/"my_room_id"/send/m.room.message"
Unfortunately, I have not yet been able to send an image that is located locally on the computer via the client-server API. According to the documentation you have to select m.image as the message type and reference the image accordingly.
Unfortunately, even after intensive research, I haven't found a working example yet. Can someone point me in the right direction?
I have tried various curl commands and tried to reference the file, either by a link, a path, or a pipe command.