Search code examples
javascriptgoogle-chrome-appgoogle-chrome-os

How to download a file on a Chrome packaged app?


When looking at downloading a file I always end up at the docs for chrome.downloads API, but this is only available for extensions and not packaged apps.

So how can I download a file in a Chrome packaged app?


Solution

  • See the documentation for Referencing external resources.

    In short, the recommendation is to save downloaded resources (e.g. images) as blob: URLs that you can store in any of the Storage APIs.