Here you can see the code:
I tested it in Chrome 56 and Internet Explorer 11 and it worked.
If you want to upload other kind of documents (more that 2 MB). Then I recommend you take a look to this post: http://sharepointcookies.com/2017/02/programmatically-uploading-large-files-client-side-to-sharepoint-2013/ from my colleague Kev.
Please, feel free to write a comment if that is not working in your specific scenario!