$("input[id='uploadFile']").change(function(e){
var tgt = e.target || window.event.srcElement;
var files = tgt.files;
if (FileReader && files && files.length) {
var newImg = "<img id='new-img' src='#' alt='' class='img-thumbnail'/>";
var selectedFile = files[0];
var fr = new FileReader();
fr.onload = function () {
newImg = newImg.replace("#", fr.result);
}
fr.readAsDataURL(selectedFile);
var fdata = new FormData();
fdata.append("file", selectedFile);
....
}
});