Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
set default file open path in electron application

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!