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

354
Views
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
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!