How to overcome “This site is attempting to download multiple files” dialog in android chrome

Today, I ran into the issue with Chrome (Android) with my Web Application, we allow users to download files through our web application and they can download many files one after another or bundled in a zip.

Now once user downloaded a file and tried to download another, chrome shows a message like this : (“This site is attempting to download multiple files”)

Chrome Alert

I started looking for any alternate method which can help to fix this, we use a single method to initiate all downloads so there was no option to bind separate methods to each click events, so rather we tried something else and it fixed it.

We use a form while submitting every commands to server for downloading file, I just simply added a target of this form to “_blank” everything else stayed same, the action attribute stayed same as well. This trick solved the issue, now when user initiates a download another tab opens, and it closes it automatically when download is initiated, so its not a big problem!

If you are not using a form but an ajax call, you can still do it with this way, just add a fake form on page, set action to your ajax call’s URL and submit your ajax call through this form, so it will do the same trick.


facebooktwittergoogle_plusredditpinterestlinkedinmailfacebooktwittergoogle_plusredditpinterestlinkedinmailby feather