I am writing an angular application, and I allow users to download zip files by pressing a button that calls the controller method through ng-click.
Inside the angular method, I call window.open(url, '_self', false)(the same applies to window.location.assign(url))
Downloading zip works fine, however I see this warning in Chrome:
A resource is interpreted as a Document, but is passed with the MIME type Application / octet stream
I am stuck with using a button because from what I saw it <a href="url" download>will do the job.
Any ideas on how this can be resolved?
thank
source
share