aspose file tools*
The moose likes JSP and the fly likes Preview an image before uploading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Preview an image before uploading" Watch "Preview an image before uploading" New topic
Author

Preview an image before uploading

Aravind Bhat
Ranch Hand

Joined: Jun 16, 2006
Posts: 32
I have the need to preview an Image before uploading it . Kindly hep .


Regards ,

Aravind~
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can't.

Browsers are very strict about not allowing Javascript access to items on the client's file system. What you could do is allow the upload to go to a temp directory on the server, show it to the user, and allow him/her to accept or reject it. Then either delete it or move it to a useful location, depending on which they choose.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Aravind Bhat
Ranch Hand

Joined: Jun 16, 2006
Posts: 32
Thank you for the same - will try out that option .

Regards ,

Aravind .A
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Preview an image before uploading