CSV File download in a custom app via anchor tag not working for Chrome 83.x version

CSV File download is not working in custom app for Chrome 83.x version. 

 

I was using the download via creating an anchor with download attribute and which was working fine before. But after upgrading the Chrome to new version it is not working.

 

Kindly, provide any information on alternate way where we can download files using DOMO methods.

 

Thanks in advance.

Best Answer

Answers

  • can you link some sample code here?

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • export function downloadCsv(csvString: string, opts: ExportCsvOpts = defaultExportCsvOpts): void {
    const BOM = "\uFEFF"; // its neded to aprse japanese signs
    const csvBlob = new Blob([`${BOM}${csvString}`], { type: "text/csv;charset=utf-8" });
    const fileName = `${opts.fileName}.csv`;
    if (navigator.msSaveBlob) {
    navigator.msSaveBlob(csvBlob, fileName);
    } else {
    const a = document.createElement("a");
    a.href = URL.createObjectURL(csvBlob);
    a.download = fileName;
    a.style.visibility = "hidden";
    a.click();
    }
    }

    Hi JaeW,

     

    Here is the JS code which I was using to download a file as CSV. This was working fine until a new update in Chrome 83.x came. Please, let me know if there are any solutions.

     

    Thanks for your response..

  • Thank you so much for your response. I will look for any other solution in this case.

This discussion has been closed.