danielperna84 / hass-configurator

Configuration UI for Home Assistant
MIT License
306 stars 168 forks source link

Feature request: allow configuration of binary file types #233

Open BVMiko opened 1 year ago

BVMiko commented 1 year ago

There is currently a static list of binary file types which will not be opened in the text editor, I'm proposing to make that a configuration option.

For my specific use case, I want to edit an SVG file, which is just an XML.

The raw_open variable is restricting SVG, considering it a binary file type. Additionally, the request to the file API needs to be updated to specify an accept header of text/*.