I’m writing an electron app for viewing local obj and stl files. Currently I’m having the trouble where file:/// files aren’t allowed. I’ve looked over the local files documentation but it doesn’t really answer what I’m hoping to do.
My goal -
- allow the user to click a button (easy enough)
- pick a file on their computer anywhere (easy enough)
- add that model to a scene so that the user can view it. (here’s the real question)
I’m looking at using IPC to send that file contents as a blob to the renderer, but is there no better way? And if this is the best way does anyone have a quick code example where they’ve done the same?
It’s not really viable for me to http serve the files because they could be anywhere on the drive.