{"action":"created","issue":{"url":"https://api.github.com/repos/eligrey/FileSaver.js/issues/165","labels_url":"https://api.github.com/repos/eligrey/FileSaver.js/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/eligrey/FileSaver.js/issues/165/comments","events_url":"https://api.github.com/repos/eligrey/FileSaver.js/issues/165/events","html_url":"https://github.com/eligrey/FileSaver.js/issues/165","id":99188539,"number":165,"title":"Saving multiple files","user":{"login":"yehudahkay","id":9964988,"avatar_url":"https://avatars.githubusercontent.com/u/9964988?v=3","gravatar_id":"","url":"https://api.github.com/users/yehudahkay","html_url":"https://github.com/yehudahkay","followers_url":"https://api.github.com/users/yehudahkay/followers","following_url":"https://api.github.com/users/yehudahkay/following{/other_user}","gists_url":"https://api.github.com/users/yehudahkay/gists{/gist_id}","starred_url":"https://api.github.com/users/yehudahkay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yehudahkay/subscriptions","organizations_url":"https://api.github.com/users/yehudahkay/orgs","repos_url":"https://api.github.com/users/yehudahkay/repos","events_url":"https://api.github.com/users/yehudahkay/events{/privacy}","received_events_url":"https://api.github.com/users/yehudahkay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-05T12:00:25Z","updated_at":"2015-11-19T04:51:12Z","closed_at":null,"body":"Hi,\r\n\r\nI tried saving multiple files in Chrome with \r\n```\r\nfor (i = 0; i < files.length; i++) {\r\nvar blob = new Blob([files[i].data])\r\nsaveAs(blob, files[i].fileName)\r\n}\r\n```\r\nhowever it downloads the first file multiple times.\r\n\r\nDoing this worked fine\r\n```\r\nfor (i = 0; i < files.length; i++) {\r\nvar blob = new Blob([files[i].data])\r\nif (navigator.appVersion.toString().indexOf('.NET') > 0)\r\n                    window.navigator.msSaveBlob(blob, fileName)\r\nelse {\r\nvar a = document.createElement(\"a\")\r\ndocument.body.appendChild(a)\r\na.style = \"display: none\"\r\na.href = window.URL.createObjectURL(blob)\r\na.download = files[i].fileName\r\na.click()\r\n}\r\n}\r\n\r\nAny solution? Thanks!"},"comment":{"url":"https://api.github.com/repos/eligrey/FileSaver.js/issues/comments/157950552","html_url":"https://github.com/eligrey/FileSaver.js/issues/165#issuecomment-157950552","issue_url":"https://api.github.com/repos/eligrey/FileSaver.js/issues/165","id":157950552,"user":{"login":"Hypercubed","id":509946,"avatar_url":"https://avatars.githubusercontent.com/u/509946?v=3","gravatar_id":"","url":"https://api.github.com/users/Hypercubed","html_url":"https://github.com/Hypercubed","followers_url":"https://api.github.com/users/Hypercubed/followers","following_url":"https://api.github.com/users/Hypercubed/following{/other_user}","gists_url":"https://api.github.com/users/Hypercubed/gists{/gist_id}","starred_url":"https://api.github.com/users/Hypercubed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hypercubed/subscriptions","organizations_url":"https://api.github.com/users/Hypercubed/orgs","repos_url":"https://api.github.com/users/Hypercubed/repos","events_url":"https://api.github.com/users/Hypercubed/events{/privacy}","received_events_url":"https://api.github.com/users/Hypercubed/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T04:51:11Z","updated_at":"2015-11-19T04:51:11Z","body":"Yes, I just discovered this.  If you try to download multiple files it will only download one.  I think it's because the setTimeout here https://github.com/eligrey/FileSaver.js/blob/master/FileSaver.js#L146 reuses the save_link element.\r\n."}}