Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

216
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda