For quite some time, it has been possible to use redis as the object store for ioBroker. Since that time, files do not necessarily exist in the local file system if written by an adapter.
In that case, sending an image/file created by another ioBroker Adapter / Script via telegram fails because it does not exist in the local file system. Handing telegram the ioBroker path, like adapter.0/some/object/path.jpg leads to the error message telegram.0: Failed sending [chatId - ####]: Error: ETELEGRAM: 400 Bad Request: wrong HTTP URL specified
One can work around that issue in scripts and read the image via readFile and then send the contents of the file. But given that iobroker probably sends more images from other adapters than external images from the file system itself, support for sending directly from the file store should be added.
Similar problem raised as #908
if i use the sendTo function like this:
sendTo(telegram.0, { text: message });
if the text is an filepath to a image (eg. /opt/iobroker/temp/cam/grafana1.png ..... to send redered Panel).
the image will be send to telegram.
if i use a filepath from the iob-storage (uploaded in the iob admin filebrowser and redis is active), there is no file an so it wont be sendet.
is it possible to check if there is no file in the linux path to check is there a file in the iob storage with this filepath and send it?
For quite some time, it has been possible to use redis as the object store for ioBroker. Since that time, files do not necessarily exist in the local file system if written by an adapter.
In that case, sending an image/file created by another ioBroker Adapter / Script via telegram fails because it does not exist in the local file system. Handing telegram the ioBroker path, like
adapter.0/some/object/path.jpgleads to the error messagetelegram.0: Failed sending [chatId - ####]: Error: ETELEGRAM: 400 Bad Request: wrong HTTP URL specifiedOne can work around that issue in scripts and read the image via readFile and then send the contents of the file. But given that iobroker probably sends more images from other adapters than external images from the file system itself, support for sending directly from the file store should be added.
Similar problem raised as #908
if i use the sendTo function like this:
sendTo(telegram.0, { text: message });if the text is an filepath to a image (eg. /opt/iobroker/temp/cam/grafana1.png ..... to send redered Panel).
the image will be send to telegram.
if i use a filepath from the iob-storage (uploaded in the iob admin filebrowser and redis is active), there is no file an so it wont be sendet.
is it possible to check if there is no file in the linux path to check is there a file in the iob storage with this filepath and send it?