In filePath I get a .csv file with an but e.target.result return me a .xls file.
can I change the file extension ? or
can I maintain the original extension?
thanks!!
let reader = new FileReader();
reader.onload = ( (theFile) =>{
return (e) => {
// e.target.result ;
resolve( e.target.result );
};
})( filePath );
// Read in the file as a data URL.
reader.readAsDataURL( filePath );