Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

image upload quary:need help  RSS feed

 
John Mclain
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear developers,
after making a thorough look over diffrent forums and now got a idea to upload an image using URLConnection.

the idea is,
1) establish a URLConnection between an applet and servlet
2)send the actual image(confused) or path of image at user's local drive to servlet using post method.
3) use servlet to upload image using Image's path or actual Image to server's hard drive from inputstream.

now at one poing i got confused, that whether path of image should be sent to servlet or actual image after encoding it via this communication to further uploading process?

if at any poing you figure out any unsuited way then let me know also

thanks
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You shouldn't send the local path of the image, just the filename itself. For more information on HTTP file upload you may wish to refer to RFC 1867

For a Java class to handle this you may look at:

http://www.jscape.com/secureinetfactory/docs/javadoc/com/jscape/inet/http/HttpFileUpload.html

part of Secure iNet Factory suite

http://www.jscape.com/secureinetfactory/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!