Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Preview an image before uploading

 
Aravind Bhat
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the need to preview an Image before uploading it . Kindly hep .


Regards ,

Aravind~
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Aravind Bhat
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the same - will try out that option .

Regards ,

Aravind .A
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic