Uploading files in Electron Application


#1

I would like users to have the ability to upload their own plugins to the application I am developing. These plugins will be HTML and JS files that will work with the current application. The application is packaged using asar… Will users still be able to upload their plugins to the asar? Or would the plugins need to be uploaded somewhere else? Can electron read the plugins as asar as well?


#2

I don’t think you can alter the asar package of the running application so you need to store them elsewhere. Check app.getPath for likely candidates.

My understanding of the packaging docs is that you can read asar files in both the main and renderer processes.