Refs:
How to preview a image before upload using JavaScript or jquery? javascript - image preview before upload How to upload preview image before upload through JavaScript
didn't worked for me... from above refs some only worked in ff and some is uploading first and then only showing preview.
I find the exact solution in: http://blueimp.github.com/jQuery-File-Upload/
It works in all i have tested.
I find it working but my code isn't working. So what is the keypoint blueimp is following and i missing for enabling image preview before upload.
I tried with :
$('.hidFileBtn').live('change', function(e){ $childImg = $(this).closest('.parent').find('img.previewImg'); var FileName = $(this).val(); console.log(FileName + "-" + $(this)[0].value); $childImg[0].src = $(this).val(); });
But no luck.