I need to show upload image before upload using jquery but in chrome path shown fake path like this:
C:\fakepath\myImage.jpg
and in firefox it’s shown only file name:
myImage.jpg
so how can me preview my image file before uploading
<input type="file">
<img src="" class="preview" />
if that is impossible.. what about HTML5?
I don’t know of a jQuery function (sorry), but it is possible with HTML5, and most browsers support this HTML5 function. I found a piece of code in HTML5rocks (1):
Good luck 🙂
(1) HTML5rocks – Reading Files: http://www.html5rocks.com/en/tutorials/file/dndfiles/