code: function (file) {
        return $.Deferred(function (deferred) {
          $.extend(new FileReader(), {
            onload: function (e) {
              var dataURL = e.target.result;
              deferred.resolve(dataURL);
            },
            onerror: function () {
              deferred.reject(this);
            }
          }).readAsDataURL(file);
        }).promise();
      }
docs: @method readFileAsDataURL
  
  read contents of file as representing URL
  
  @param {File} file
  @return {Promise} - then: dataUrl