With the addition of the HTML 5 FileReader interface, client-side processing of file uploads is now possible using JavaScript alone. This is great news for anyone aiming to keep their web application’s functionality running in the browser instead of the server.
My current project involves an Ember.js web application and a JSON+HAL API, and we recently wanted to let administrative users upload an XML file, sourced from a different system, to make filling out a form easier. We didn’t want to upload the file to the API for processing on the server. Following is an example illustrating how we handled the file upload in our Ember.js app, and how we could make this work with a few other file formats.
Your new post is loading...