how can after choose image and before upload (before insert in database) displaying image?
this code not displaying image:
var a = $('<img src="' + g.STRING.selected.replace('$file', v) + '" alt="Angry face" width="50" height="50" />'),
<input type="file" name="image' >
With respect
You can use the HTML5 File API (tutorial) to display the selected file. The best way is probably to use a
FileReaderto get a dataURL of the file and assign it to asrcof animg.