--- allow_origins: - '*' allow_xss: false alt_top_banner: '' auto_reload: false auto_reload_interval: 5.0 code: "device = all_devices[path[1]]\r\nfor i in all_devices[path[1]].config.get('kaithem.read_perms','').strip().split(\"\ ,\"):\r\n if not has_permission(i):\r\n raise RuntimeError(\"Missing permission\ \ for that camera: \"+repr(i))\r\n\r\ndir = os.path.expanduser(device.config['device.storage_dir'])\r\ \nfor i in path:\r\n if i.startswith(\"/\"):\r\n raise RuntimeError(\"\ security\")\r\n \r\nserve_file(os.path.join(dir,*path[1:]))\r\n" mimetype: text/html no_header: false no_navheader: false require_method: - GET - POST require_permissions: - view_nvr resource_timestamp: 1713117546920368 resource_type: page setupcode: "import os\r\nfrom kaithem.api.devices import all_devices\r\nfrom kaithem.api.web\ \ import has_permission" streaming_response: false template_engine: mako theme_css_url: '' ---