I'm building a basic social network and in the registration the user uploads a display image. Basically I wanted to display the image, like a preview on the same page as the form, just after they select it and before the form is submitted.
Is this possible?
this can be done very easily with HTML 5, see this link http://www.html5rocks.com/en/tutorials/file/dndfiles/
I found This simpler yet powerful tutorial which uses the
fileReader
Object. It simply creates an img element and, using the fileReader object, assigns its source attribute as the value of the form inputI feel we had a related discussion earlier: How to upload preview image before upload through JavaScript
Image can not be shown until it serves from any server. so you need to upload the image to your server to show its preview.
nice open source file uploader
http://blueimp.github.com/jQuery-File-Upload/