Upload file to server using W3C File API

This code shows how to upload file from file system using W3C File API and XMLHttpRequest.