Back to Browse

generate downloadable files in the browser using Blob and URL API

68.8K views
Jun 29, 2020
12:50

Shows how to create CSV, TXT, PDF, ICS/iCal, etc files right within the browser without ever hitting server-side. Uses the Blob API to build files in the browser and the URL API to create object URLs from them to make them downloadable. The whole thing is as simple as ... const a = document.getElementById("a1"); const blob = new Blob(["your data"]); a.href = URL.createObjectURL(blob); For questions, post a comment. For business inquiries, email [email protected].

Download

1 formats

Video Formats

360pmp415.3 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

generate downloadable files in the browser using Blob and URL API | NatokHD