I use a chat to be informed when a movement is detected on one of the cams controlled by my home automation system.
When a movement is detected, I first upload an Image where the movement was detected with:
curl -X PUT -u user:pw https://NEXTCLOUD/remote.php/dav/files/USER/Unifi-EVA/detection.png -T /media/picture/lastDetection.png
After uploading the file I share it in the particular chat with:
curl -H āContent-Type: application/jsonā -H āAccept: application/jsonā -H āOCS-APIRequest: trueā -d ā{āshareWithā:āchatIDā,āshareTypeā:10,āpathā:ā/detection.pngā}ā https://NEXTCLOUD/ocs/v2.php/apps/files_sharing/api/v1/shares
It works quite good however the image posted in the chat does not apear with a small thumbnail only a standard paceholder is used.
How can I upload the image to the chat with a preview?
Thx
Andy