Get file from Lightning input type file

With the Spring 17 release one of the new change on the markup is the introduction of the type file to the lightning:input, however I can’t seem to get the file back, only a fakepath with the name of the file.

I’ve tried

<lightning:input aura:id="fileSelector" type="File" label="Upload file"/>


Is there a way to get the file without using a standard input ?


lightning:input is still beta, and has quite a few problems. It doesn’t even currently have a documented files attribute at the moment. As far as I’m aware, you still need to use a native input element of type “file”.

Source : Link , Question Author : Nordine Hammache , Answer Author : sfdcfox

Leave a Comment