I'm working with a lightning custom component that needs to load files and handle them in back controller.
I have this definition of lightning:input:
<lightning:input type="file" label="{!$Label.c.TM_FirmaEvidencia}" multiple="false" onchange="{!c.handleFileChange}"/>
And this controller.js function:
handleFileChange : function(component, event, helper){
var files = event.getSource().get("v.files");
console.log(JSON.stringify(files));
debugger;
},
But it's always giving me the following console:
{"0":{}}
No matter what type of document I'm trying to load (even thought I'm not surpasing the size limits) it doesn't appear to work.
Does anyone know what may be causing this?