Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read file using file object(URGENT)

 
Angela D'souza
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Like yahoo photos, I want to download file from user disk or network to server using javascript. How can I do that?
Thanks,
Angels
 
Heath Lilley
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way I know of to upload files from a client is to set up a servlet on the server that reads the request data and saves it to the server's HD.
Here is a link to the java download page of a set of classes we used to upload files from a clients machine. They are from Oreilly.
http://www.servlets.com/cos/index.html
The class You want to look at is the Multipart Request
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could have <input type=file ,
but anyway you need to handle file submission on a server side.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic