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
-
As i understand it the iframes in Domo apps are all sandboxed as a security feature, hence why this would stop working (see linked article). I don't know of a workaround, this might be a question to direct at the apps team via support.
https://www.androidpolice.com/2020/04/17/chrome-beta-83-revamps-form-controls-blocks-downloads-from-sandboxed-content-and-more-apk-download/
Other features
As always, Chrome 83 includes changes for both users and developers. Here are some smaller changes in this update:
- The new @supports selector() feature makes it easier to check if a CSS feature is supported before it is used.
- The Barcode Detection API is now enabled by default.
- Downloads from sandboxed iframes are now blocked, preventing malicious ads and other embedded content from downloading files.
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"1
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"1 -
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..
0 -
As i understand it the iframes in Domo apps are all sandboxed as a security feature, hence why this would stop working (see linked article). I don't know of a workaround, this might be a question to direct at the apps team via support.
https://www.androidpolice.com/2020/04/17/chrome-beta-83-revamps-form-controls-blocks-downloads-from-sandboxed-content-and-more-apk-download/
Other features
As always, Chrome 83 includes changes for both users and developers. Here are some smaller changes in this update:
- The new @supports selector() feature makes it easier to check if a CSS feature is supported before it is used.
- The Barcode Detection API is now enabled by default.
- Downloads from sandboxed iframes are now blocked, preventing malicious ads and other embedded content from downloading files.
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"1 -
Thank you so much for your response. I will look for any other solution in this case.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive