+ Start a Discussion
bakul.patelbakul.patel 

Uploading a file using lightning component

I am trying to upload a file using lightning component. I do have good understanding of the code involved, but for some reason the I try to get "files" from the input element type=file, it returns undefined.
 
var fileInput = document.getElementById("file1");
var file = fileInput.files;
I get undefined in 2nd line.

Anybody has file uploading working through lightning?