Skip to content

Instantly share code, notes, and snippets.

@trevorfoskett
Created February 27, 2020 16:18
Show Gist options
  • Save trevorfoskett/6a7fac3df4d0c59bcd42de0054952dbc to your computer and use it in GitHub Desktop.
Save trevorfoskett/6a7fac3df4d0c59bcd42de0054952dbc to your computer and use it in GitHub Desktop.
Main thread registers the button click event and opens the file dialog to select filepaths.
ipcMain.on('open-file-dialog', async (event) => {
var paths = dialog.showOpenDialogSync(win, {
properties: ['openFile', 'multiSelections']
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment