Path for file within HA Docker container

I want to send an image file in a Telegram notification, but (assume) I require the full file path to the file. Since I am within the Docker container the config folder is mapped to /config, but what should the full path be? I currently get the error below:

Error sending file: Can't parse entities: can't find end of the entity starting at byte offset 54. Args: (339855604, <_io.BufferedReader name='/config/www/deepstack_images/deepstack_person_2019-06-26-21-25-01.jpg'>), kwargs: {'caption': 'Captured /config/www/deepstack_images/deepstack_person_2019-06-26-21-25-01.jpg', 'parse_mode': 'Markdown', 'disable_notification': False, 'disable_web_page_preview': None, 'reply_to_message_id': None, 'reply_markup': None, 'timeout': Nonne}

checked in my docker container and it is /config/www/…

btw - I used a URL onto the camera_proxy to send an image via telegram rather than a path link to a file - never tried the file attribute.

I have something similar… for my Tensorflow the output file is:

/config/www/image.jpg

But then when I use this as an image in HA,and also my NodeRed automation I have to change www to local and use the IP with Port:

http://xx.xx.xx.xx:8123/local/image.jpg

Not sure if this is what you are looking for, but hopefully it helps!
DeadEnd

So I have discovered the full path, but appears HA cannot access it, so I will have to use the local share approach. This is one of those ‘docker lessons’

Log Details (WARNING)
Thu Jun 27 2019 06:05:01 GMT+0100 (British Summer Time)
'/var/services/homes/robmarkcole/Home-Assistant/www/deepstack_images/deepstack_person_2019-06-26-21-25-01.jpg' are not secure to load data from!

I use Docker (non-hassio) and I have an “alarm system” that I configured that takes a snapshot from the camera that monitors the area that triggered the alarm then it sends that snapshot to my pushbullet notifications.

Here is the snippet of the code that maps the sensor that triggered the alarm to the file name to be saved:

'binary_sensor.door_window_sensor_1_sensor':'/config/www/snapshots/kitchen_alarm_1.jpg'

I also found that my HA couldn’t find that folder that is referenced there until I whitelisted that folder in the HA config:

homeassistant:
  whitelist_external_dirs:
    - '/config/www/snapshots'

After that it worked perfectly.

Hello there !

I was looking to make it work without success when I’ve found this topic. My problem was that the “www” folder had just been created so access by /local/ path was not working.

If someone has the same problem, you just had to reboot HA !