Posts

Showing posts with the label html5

Saving Files Client Side

A couple of html5 interfaces that allow you to download files from the client side are: FileSaver BlobBuilder These haven't quite made it into the browsers, but there are projects on GitHub for both of these interfaces, whilst we wait for them to become main stream. The basic examples on the FileSaver project README are saving both a text file based on an input string, and saving a canvas as an image file (you can already redirect the user to the data url of the canvas object, but this would actually download the file). See:  https://github.com/eligrey/FileSaver.js  and  https://github.com/eligrey/BlobBuilder.js . Anyways, i'll give a little focus on saving a file.  I have a basic page with a text field to be used as the file name (:P20_FILE_NAME) and a text area with the data that I want to save to a file (:P20_EXPORT_CONTENT). First I need to add a reference to the two interfaces (I just added these into the page header - obviously better to import t...