hi, i'll like to have a look at the code, pls send me one also, thanks in
advance.
"Michael \"Nazgul\" C." wrote:
> Hello!
>
> What the problem dude!
> If I understood right, you have some frontend client application that
> communicates with your servlet using socket connection or URLConnection.
> Then the solution is obvious.
> You have to change your communication protocol between frontend and servlet
> to get the possibility of uploading portions of file.
> In my opinion on frontend side you have to:
> 1) open communication link to servlet
> 2) send filename
> 3) send whether user decided to upload from scratch or he just resumes
> uploading
> 4) receive the pointer from where in file read data (seek from beginning of
> file)
> 5) read portion of data from file
> 6) send this data
> 7) check whether Pause button was pressed. If not pressed go to 5) else goto
> 8)
> 8) send notification to servlet that you stop to send data from file.
> 9) close communication link.
>
> In respect to 7) I would recomment to send the small amount of data in one
> portion. But not too small in respect of performance.
> That how I'd do it.
>
> If you would like to find out technical solutions for this variant, I could
> describe it in additional letter later.
> GL
> Michael.
>
> ----- Original Message -----
> From: <bikashpaul_2001@y...>
> To: "Servlets" <servlets@p...>
> Sent: Friday, January 18, 2002 7:24 AM
> Subject: [servlets] Help me plz..........Confused:
>
> > Hi all friends,
> >
> > I am facing problem with my uploading of file programme.In my client side
> > interface I want to give facility to client that they can "Pause" the
> > uploading of one file in between just like cancelling it and can start
> > uploading of new file from scratch and when they want to restart("Resume")
> > that file again which they paused it in between it should be start from
> > that point where they paused it means if they paused it at 40% it should
> > start from 41% not from scratch.For monitoring upload iam using progress
> > monitor dialog .Now for that :-
> > 1.client have to send query to remote server to get the length of remote
> > file which is incomplete.
> > 2. client to skip ahead in the file reading up to the length reported by
> > the servlet.
> > 3.And should send those portion of file to server which is incomplete and
> > server will have to APPEND the data to the file, rather than writing it.
> > 4.Or client can simply begin a new upload from scratch.
> > 5.the servlet would have to be able to distinguish these two cases 3 and
> > 4.
> >
> > I couldn't decide(confused)how I can start to give this facility to
> > client.My programme working fine with simple uploading
> > without those options.Can any one guide me how I can do that or give me
> > some code for that.if any one really interested to help me I can send my
> > codes to him/her.
> >
> > Thanks in Advance
> > Bikash
> >
>