I have an ms-word document as HTMLInputElement in my javascript. How do I get the full content of the file to save it as a Blob object and be able to retrieve it?

var file = document.getElementById('ms-word');
**var content = file.getcontentofthefile;**

Thanks

有帮助吗?

解决方案

inputElement.files[0].slice(0, inputElement.files[0].size);

Taken from http://www.html5rocks.com/en/tutorials/file/dndfiles/.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top