none
How to Convert <input type="file"> into binary form through javascript ? RRS feed

  • Question

  • var fileList = document.getElementById("myfile").files;
        var fileReader = new FileReader();
        if (fileReader && fileList && fileList.length) {
            fileReader.readAsBinaryString(fileList[0]);
            fileReader.onload = function () {
                var imageData = fileReader.result;
            };
        }   
    Friday, June 29, 2018 12:10 PM

Answers