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

349
Vistas
Why is the download interrupted when i call chrome.downloads.download method with enabled "Ask where to save each file before downloading" option

I'm writing Chrome extension that saves some files using chrome.downloads.download method. I call it from my background.js and it works fine unless "Ask where to save each file before downloading" option of browser is enabled or saveAs option is true.

This is background.js which reproduces this problem:

chrome.downloads.download({
  url: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png',
  saveAs: false
}, (itemId) => {
  chrome.downloads.onChanged.addListener((delta) => {
    if (itemId === delta.id) {
      console.log(delta) 
    }      
  })  
})

It downloads google logo when saveAs is false. In console i can see events first with status in_progress then with status complete. But if i set saveAs to true, there will be event with status iterrupted and error USER_CANCELED. Chrome doesn't open "Save as" dialog for some reason i don't understand, even if "Ask where to save each file before downloading" is enabled. More to it if "Ask where to save each file before downloading" is enabled download will be interrupted regardless of the saveAs value.

Chrome documentation describes saveAs option: "Use a file-chooser to allow the user to select a filename regardless of whether filename is set or already exists". But for me it doesn't work regardless of the value of filename option. Am i missing something?

The Chrome version is the last as of today (Version 102.0.5005.115 (Official Build) (64-bit)) and manifest version is 3.

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