function readFile(file, onload, onerror, method) {
    if (!$.FileReader) return false
    var reader = new FileReader()
    reader.onload = function () {
      onload.call(reader, this.result)
    }
    if (onerror) {
      reader.onabort = reader.onerror = function () {
        onerror.call(reader, this.error)
      }
    }
    var readerMethod = reader[method || 'readAsDataURL']
    if (readerMethod) {
      readerMethod.call(reader, file)
      return reader
    }
  }
Loads a given File object via FileReader interface.

@param {Blob} file Blob object
@param {Function} onload Load event callback
@param {Function} [onerror] Error/Abort event callback
@param {string} [method=readAsDataURL] FileReader method
@returns {FileReader|boolean} Returns FileReader if API exists, else false.