In my code below i am uploading a file in the input file below and i am trying to assign that image that i upload to a var called addimg using val(). But when i add it in the append function below it shows C:\fakepath\ (in the elements tab in dev tools google chrome) instead of the actual image src. How can i get the image source to work properly?
JS
addimg = $('.addimg').val();
$('table').append('<tr><td>'+date+'</td><td><img src="'+addimg+'"/></td>
<td>'+addname+'</td><td>'+addqty+'</td><td>'+adddescript+'</td><td>'+addcat+'</td>
<td>'+addprice+'</td></tr>');
HTML
<input class="addimg" type="file" name="Choose Image">
<table>
<table>