{"action":"closed","issue":{"url":"https://api.github.com/repos/axios/axios/issues/2354","repository_url":"https://api.github.com/repos/axios/axios","labels_url":"https://api.github.com/repos/axios/axios/issues/2354/labels{/name}","comments_url":"https://api.github.com/repos/axios/axios/issues/2354/comments","events_url":"https://api.github.com/repos/axios/axios/issues/2354/events","html_url":"https://github.com/axios/axios/issues/2354","id":479653711,"node_id":"MDU6SXNzdWU0Nzk2NTM3MTE=","number":2354,"title":"How do i download a zip with multiple types of files","user":{"login":"Otorrinolaringologistaman","id":21142421,"node_id":"MDQ6VXNlcjIxMTQyNDIx","avatar_url":"https://avatars0.githubusercontent.com/u/21142421?v=4","gravatar_id":"","url":"https://api.github.com/users/Otorrinolaringologistaman","html_url":"https://github.com/Otorrinolaringologistaman","followers_url":"https://api.github.com/users/Otorrinolaringologistaman/followers","following_url":"https://api.github.com/users/Otorrinolaringologistaman/following{/other_user}","gists_url":"https://api.github.com/users/Otorrinolaringologistaman/gists{/gist_id}","starred_url":"https://api.github.com/users/Otorrinolaringologistaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Otorrinolaringologistaman/subscriptions","organizations_url":"https://api.github.com/users/Otorrinolaringologistaman/orgs","repos_url":"https://api.github.com/users/Otorrinolaringologistaman/repos","events_url":"https://api.github.com/users/Otorrinolaringologistaman/events{/privacy}","received_events_url":"https://api.github.com/users/Otorrinolaringologistaman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-08-12T13:43:55Z","updated_at":"2019-08-14T05:06:25Z","closed_at":"2019-08-14T05:06:25Z","author_association":"NONE","body":"In my vueJs application i have the following axios POST api call that is suppose to return multiple files that i wish to save on a .zip folder. however when i use the following axios method i can't open my zip and an error occurs saying that \"my folder.zip is invalid\".\r\n\r\nHow do i properly download the response.data?\r\n\r\nHere is the method. I send a few needed information in my raw call body and a file that is needed to be uploaded so i can get the other files that i need to download.\r\n\r\n```\r\n**upload() {\r\n      console.log(\"uploading\")\r\n      let formData = new FormData();\r\n      let gerarMenus = \"on\";\r\n      let zipName= \"test\";\r\n      let var1= \"on\";\r\n      let var2= \"on\";\r\n      let var3= \"on\";\r\n      let var4= \"on\";\r\n       this.files.forEach((f,x) => {\r\n         formData.append('file'+(x+1), f);\r\n\r\n```\r\n       });\r\n       formData.append('zipName', zipName);\r\n         formData.append('var1', var1);\r\n         formData.append('var2', var2);\r\n         formData.append('var3', var3);\r\n         formData.append('var4', var4);\r\n\r\n       axios\r\n         .post(\"/myUrl/downloadFile\", formData)\r\n         .then((response) => {\r\n           console.log(response.data)\r\n            const url = window.URL.createObjectURL(new Blob([response]));\r\n            const link = document.createElement('a');\r\n            link.href = url;\r\n            link.setAttribute('download', zipName+ '.zip');\r\n            document.body.appendChild(link);\r\n            link.click()}\r\n            ).catch(e => {\r\n          console.error(e);\r\n        });**"}}
{"actor":{"display_login":"jasonsaayman"}}