Ever since work began on my HypeMachine Chrome Extension one of the biggest requests from people was to make the arrow button launch a ‘Save As’ download box rather than playing the mp3 in the browser. How the browser handles files is determined by it’s Internet Media Type (MIME) which is set by the server.
Mp3’s for instance have the MIME ‘audio/mpeg’ in the header
Whenever Chromium notices a file with the audio/mpeg MIME it automatically loads the file in the webplayer present in the browser, leading to people having to right click the button and select ‘Save As’ manually. I was hoping that there was functionality in the Chrome Extension API to cause downloads given URL however it turned out it was not the case. Until now. Sorta.
Looks like work has begun on a new API (experimental) to offer the functionality I was hoping for! The issues and code can be tracked as follows:
- Issue 68201: (Downloads grouping issue) Extension API
- Downloads Extension API Proposal
- Changelist 7192016: chrome.experimental.downloads
Although the changelist is supposedly several weeks away from being committed and usable, discussions regarding the API and feedback are ongoing. Once the changelist is submitted, I can begin to tinker with adding it to my extension, however I will have to wait for it to be no longer under experimental before updating it in the Chrome Store.
I’m curious to see what other extensions will benefit from this API.