How to set the default path in electron app that is used whenever users select files to upload (via HTML file inputs)?
Context:
I have a website running in an electron application where users can upload and download files. Whenever users download files the save-dialog shows the default location. This is achieved by setting: browserWindow.webContents.session.setDownloadPath(myDefaultPath).
How could I do the same for the open-dialog? There is no setFileOpenPath() or similar.
Note: The open dialog is opened via <input type="file" ...> and not via the electron dialog. The download dialog is opened via file-saver-es if that matters.
Now in theory I could intercept the "select file"-button's click event and send an ipc message to the electron main process and open an electron dialog where I have control over the path. Then load the selected file and send the blob back via ipc to the website (renderer process). This seems awfully complicated for what I need. Hence the question.