Translate

> > Jquery Image to Base64 Convert ,For Servier side upload

Jquery Image to Base64 Convert ,For Servier side upload

Posted on Thursday, April 26, 2018 | No Comments


var file1;
            if (document.getElementById("inputFile").files.length > 0) {
                file1 = document.getElementById("inputFile").files[0];


                var reader = new FileReader();
                reader.readAsDataURL(file1);
                var image;
                reader.onloadend = function (e) {
                    var Image64= e.target.result;
                 // post to server
                   

                }
            }

Leave a Reply

Powered by Blogger.