You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by je...@keppens.net on 2002/11/12 14:22:09 UTC

File Upload : Progress Bar

Hi,

I was just experimenting with the file-upload utility of Struts, and it works 
fine. For one of my projects I need to upload rather big files, which take a 
long time.

I was thinking about implementing some kind of progress bar where the user can 
view what the status of his upload is.

The server first copies the file to a temporary folder before you can access it 
(and this first copy takes most of the time). Then I can use an InputStream to 
copy the folder to the correct place (and make that loader), but it's just on 
copying from one location on the server to another. What I need is a loader for 
copying from the client to the server.

Creating the loader is not the problem, but getting the "percentage done" is...

Has anyone done this? Or is it not possible?

thanks in advance...

Jeroen Keppens

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: File Upload : Progress Bar

Posted by Mark Ayad <ma...@javamark.com>.
I have the code for this someplace, but It would take me an age to find it.

Mark

----- Original Message -----
From: "micael" <ca...@harbornet.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 12, 2002 7:20 PM
Subject: Re: File Upload : Progress Bar


> Keep us posted.  If you run into some difficulties, I would be willing to
> jump in with some assistance, if I have some.  You can contact me at
> micael@harbornet.com.
>
> At 02:45 PM 11/12/2002 +0100, you wrote:
> >I've seen it done too, but not in JSP/Servlets (in my asp days... brrr)
> >
> >Going to try it...
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> Micael
>
> -------------------------------------------------------
>
> This electronic mail  transmission and any accompanying documents contain
> information belonging to the sender which may be confidential and legally
> privileged.  This information is intended only for the use of the
> individual or entity to whom this electronic mail transmission was sent as
> indicated above. If you are not the intended recipient, any disclosure,
> copying, distribution, or action taken in reliance on the contents of the
> information contained in this transmission is strictly prohibited.  If you
> have received this transmission in error, please delete the message.
Thank you
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: File Upload : Progress Bar

Posted by micael <ca...@harbornet.com>.
Keep us posted.  If you run into some difficulties, I would be willing to 
jump in with some assistance, if I have some.  You can contact me at 
micael@harbornet.com.

At 02:45 PM 11/12/2002 +0100, you wrote:
>I've seen it done too, but not in JSP/Servlets (in my asp days... brrr)
>
>Going to try it...
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

Micael

-------------------------------------------------------

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: File Upload : Progress Bar

Posted by John Jones <jo...@kingchompy.com>.
You might just want to use a small applet(I believe the graphics code is
already out there somewhere) and set up a servlet or jsp to check the file
size against the Content-Length of the multipart POST (this may be a little
off) and return the percentage to the applet so it can move the progress bar
accordingly.

----- Original Message -----
From: <je...@keppens.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, November 12, 2002 8:45 AM
Subject: Re: File Upload : Progress Bar


> I've seen it done too, but not in JSP/Servlets (in my asp days... brrr)
>
> Going to try it...
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: File Upload : Progress Bar

Posted by je...@keppens.net.
I've seen it done too, but not in JSP/Servlets (in my asp days... brrr)

Going to try it...

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: File Upload : Progress Bar

Posted by Gemes Tibor <ge...@regens.hu>.
2002. november 12. 14:39 dátummal Mark Ayad ezt írtad:
> I have seen this done, from what I can remember you'll need to created a
> jsp that polls an upload thread, which determines the current-size of the
> upload. You know the total size of the upload.
>
> ..sorry I can't be more specific

Umm... thats sounds as a good idea:

the submit pops up a window, the window  itself refreshes itself time to time, 
and the server responds with the progress... 

Hmm...

Sorry for misleading you in my previous mail.

Tib

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: File Upload : Progress Bar

Posted by Mark Ayad <ma...@javamark.com>.
I have seen this done, from what I can remember you'll need to created a jsp
that polls an upload thread, which determines the current-size of the
upload. You know the total size of the upload.

..sorry I can't be more specific

----- Original Message -----
From: <je...@keppens.net>
To: "struts" <st...@jakarta.apache.org>
Sent: Tuesday, November 12, 2002 2:22 PM
Subject: File Upload : Progress Bar


> Hi,
>
> I was just experimenting with the file-upload utility of Struts, and it
works
> fine. For one of my projects I need to upload rather big files, which take
a
> long time.
>
> I was thinking about implementing some kind of progress bar where the user
can
> view what the status of his upload is.
>
> The server first copies the file to a temporary folder before you can
access it
> (and this first copy takes most of the time). Then I can use an
InputStream to
> copy the folder to the correct place (and make that loader), but it's just
on
> copying from one location on the server to another. What I need is a
loader for
> copying from the client to the server.
>
> Creating the loader is not the problem, but getting the "percentage done"
is...
>
> Has anyone done this? Or is it not possible?
>
> thanks in advance...
>
> Jeroen Keppens
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: File Upload : Progress Bar

Posted by Gemes Tibor <ge...@regens.hu>.
2002. november 12. 14:22 dátummal jeroen@keppens.net ezt írtad:
> Hi,
>
> I was just experimenting with the file-upload utility of Struts, and it
> works fine. For one of my projects I need to upload rather big files, which
> take a long time.
>
> I was thinking about implementing some kind of progress bar where the user
> can view what the status of his upload is.

Sorry but his sounds impossible

The upload is done by your browser, and you have no interaction with the 
client until it sends the full request. And in this case the file is the part 
of the request, so it must be uploaded and then will you be able to do any 
action.

Hth,

Tib


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>