I've been tinkering around with a sideproject of mine. Lets say it boils down to be an image viewer. I've set it up like this:
1. I use the Filesystem Plugin to open a folder and get a list of all files
2. I loop through the files and create a bunch of image elements inside an html element
3. The image elements get the source like this: <img src="localhost:8080/[filename.png]></img>
This setup works very well and quick even for a ton of images BUT it requires me to setup the folder as server. I currently use a simple python script. Not only is there no way to get the path to the folder I selected (unless I'm missing it), even if I hardcode the path in like <img src="C:\test[filename.png]"></img> the image cannot be loaded due to browser restrictions.
Now I'm thinking since I open the folder via the filesystem plugin, I'm already giving my browser read/write access to that folder. So I should be able to access these images, right? How could I achive this?
Or option 2: Is there a way from inside construct (with js or plugin) to automatically host a local server from a folder. I'm guessing something like node.js? I'd prefer option 1 though, it seems simpler and basically there already... I feel like that should work out of the box, no?