code: function( file )
                  {
                      // Only process image files
                      if( typeof(filter_imageType) === 'function' && ! filter_imageType(file) )
                          return;
                      else if( ! file.type.match(filter_imageType) )
                          return;
                      var reader = new FileReader();
                      reader.onload = function(event) {
                          var dataurl = event.target.result;
                          insert_image_wysiwyg( dataurl, file.name );
                      };
                      // Read in the image file as a data URL
                      reader.readAsDataURL( file );
                  }
docs: File-API