aspose file tools*
The moose likes Servlets and the fly likes Uploading and downloading files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Uploading and downloading files" Watch "Uploading and downloading files" New topic
Author

Uploading and downloading files

Cherry Mathew
Ranch Hand

Joined: Dec 26, 2000
Posts: 159
Hi,
I got some questions
Upload - when im doing the uplaod of a file from the client, how will i get the size of the file. Im using ServletInputstream to read the file. And its available() method returns 0.
Download a file- Do we have any method to know whether a file which is requested by the client got downloaded fully or not.
I want the status of the download.
Thanks in advance
Siju
Cherry Mathew
Ranch Hand

Joined: Dec 26, 2000
Posts: 159
Somebody help me
Sunetra Saha
Ranch Hand

Joined: Feb 25, 2001
Posts: 77
We use Jsp smart upload which has got a free downloadable version and has all the features that you want. Why not try that?
Dmitriy Pavlyuk
Ranch Hand

Joined: Mar 25, 2001
Posts: 33
You may use the OReilly MultipartRequest class for working with uploading file. Or send me email and i send you my version of this class.
Cherry Mathew
Ranch Hand

Joined: Dec 26, 2000
Posts: 159
Hi
Thank u all
My problem is not the upload part but keeping track of that.
Dimitry please send me u r version of the program
My id is kher_m@yahoo.com
Thanks again
Cherry
Jack Wiesenthaler
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
I'm not quite sure what you want to do exactly but I'm assuming you want to monitor file upload progress.
You can read the Content-length and set a session variable that stores the progress of bytes read vs Content-length.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Uploading and downloading files