A quick example, which shows how to preview image before uploading it to the server using javascript: