var _File = {};

_File.readAsBase64 = function(file){
  var reader = new FileReader();
  
  return new Promise(function(resolve, reject){
    reader.onerror = function(){
      reader.abort();
      reject('Problem reading file.');
      };
    reader.onload = function(){
      resolve(reader.result);
      };
    reader.readAsDataURL(file);
    });
  };

export default _File;