I am just trying to send a document through array into a ajax call.
$(document).ready(function(){
$('#submit').click(function(){
var a=$('#name').val();
alert(a)
var b=$('#document').val();
alert(b)
// var array = {};
        // arry = {
          //   a: $('#name').val(),
            // b: $('#document').val(),
          //   
        // }
});
});<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="text" id="name">
<input type="file" id="document">
<input type="button" id="submit" value="click me">Here I can able to send input type="text" value.Coming to input type="file" I am getting only path of loaded file.
How can I convert it to a document?
