This feature has been removed from the Web. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.
The getAsDataURL provides a data: URL that encodes the entire contents of the referenced file.
Note: This method is obsolete; you should use the FileReader method readAsDataURL() instead.
Here is the live example.. jsfiddle.net/fKQDL/