Javascript create and download text file

2 Mar 2015 Generate a file and offer it for download using only client-side JavaScript var filename = "hello.txt"; var filetype = "text/plain"; var a = document. there is also a JavaScript API for constructing blob: URIs , which use unique  In this tutorial you'll learn how to download files like images, word or PDF If such kind of file is stored in a public accessible folder, you can just create a Image Gallery