demos/FilePicker/filePicker.js
function readFile(file, callback){

		// Run this sequentially
		sync(function(){
			// Create a new FileReader Object
			var reader = new FileReader();

			// Set an onload handler because we load files into it Asynchronously
			reader.onload = function(e){

				// Print onto Canvas
				callback( this.result );

				// Run the next one;
				sync();
			};

			reader.readAsDataURL(file);
		});
	}
function readFile(file, callback){

		// Run this sequentially
		sync(function(){
			// Create a new FileReader Object
			var reader = new FileReader();

			// Set an onload handler because we load files into it Asynchronously
			reader.onload = function(e){

				// Print onto Canvas
				callback( this.result );

				// Run the next one;
				sync();
			};

			reader.readAsDataURL(file);
		});
	}
function readFile ( file , callback ) { // Run this sequentially sync ( function ( ) { // Create a new FileReader Object var reader = new FileReader ( ) ; // Set an onload handler because we load files into it Asynchronously reader . onload = function ( e ) { // Print onto Canvas callback ( this . result ) ; // Run the next one; sync ( ) ; } ; reader . readAsDataURL ( file ) ; } ) ; }
readFile Perform one operation at a time, to get a nice gradule load
readFile Perform one operation at a time to get a nice gradule load