got the download feature working using HTML5