Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

SAPUI5 - FileUploader not working on HANA

$
0
0

Hi,

I'm trying to implement a FileUploader on UI5 project based on SAP HANA.

The uploader should be able to upload a csv file into a table on a ui5 screen (and not on HANA table).

The problem is that I have an example that works perfectly but on my project it doesn't work.

Here's the code:

 

var f = new sap.ui.unified.FileUploader({   uploadUrl : "",  buttonText : "Upload",    fileType : "csv",    maximumFileSize : 1,  icon : "sap-icon://upload",
// uploadOnChange: true,  change : function(e){  var file = e.getParameter("files") && e.getParameter("files")[0];  console.log(window.FileReader);  if(file && window.FileReader){    var reader = new FileReader();    var that = this;    reader.onload = function(evn) {    var strCSV = evn.target.result; //string in CSV   alert(strCSV);  };  reader.readAsText(file);    }  }  });

On the example, the event variable "e" on the change method, has 3 parameters (id, newValues and files) but on my project, I just get id and newValue.

Here's the example: JS Bin - Collaborative JavaScript Debugging

 

Anyone have any idea what might be the problem here?

Thanks!


Viewing all articles
Browse latest Browse all 3523

Trending Articles