kennethjiang / js-file-download

MIT License
915 stars 119 forks source link

Unable to download in Edge Browser #66

Closed abhiram04 closed 4 years ago

abhiram04 commented 4 years ago

Hey the download works in chrome and mozzila but it is not working in edge browser. please help me out here ASAP.

Thanks in Advance.

LeslieMurphy commented 4 years ago

It is working fine for me! Try using a tool like Fiddler to capture the request / response and see if perhaps you are missing some sort of headers on the server side. I am using this: axios.get("http://localhost:8000/xxx") .then((response) => { FileDownload(response.data, "LOGFILE_" + record.id + ".log"); }) .catch(error => { notify(``Error getting log file: ${error.message}``, 'error'); });

benemohamed commented 4 years ago

test on mozzila and Chromium working fine for me to try to print the response, for me the response is csv data so don't add response.data just add response

import FileDownload from "js-file-download";

this.$axios.$get("logs/?download=download").then((response) => {
     console.log(response) // log the response
  // FileDownload(response, "logs.csv");
});
kindrowboat commented 4 years ago

@abhiram04 is this still an issue for you? If so, could you post a small repo or codepen reproducing the problem?

kindrowboat commented 4 years ago

Closing due to inactivity. Please feel free to open a new issue if this persists.