Building an HTML5 Text Editor with the FileSystem APIs

// Save a file in the FileSystem. function saveFile(filename, content) { filesystem.root.getFile(filename, {create: true}, function(fileEntry) { fileEntry.createWriter(function(fileWriter) { fileWriter.onwriteend = function(e) { // Update the file browser. listFiles(); // Clean out the form field. filenameInput.value = ”; contentTextArea.value = ”; // Show a saved message. messageBox.innerHTML = ‘File saved!’; }; fileWriter.onerror = function(e) { console.log(‘Write […]

Html5 File Upload with Progress

Html5 finally solves an age old problem of being able to upload files while also showing the upload progress. However it is fairly complicated and not for the faint of heart because you are essentially taking over the entire server side processing (when you tap into the byte stream) and that includes implementing the multipart/form-data […]