Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 8th, 2003, 04:47 AM
Authorized User
 
Join Date: Aug 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default Progress bar on upload

Hi all,

I am trying to create a progress bar that is shown when a user uploads a file. This is necesarry because users can upload files to 20 Mb and without any feedback they will tend to think something is wrong.

As you might know there are two sides to uploading files: On the client side the document is parsed to a multipart/form_date structure and on the server side you actually do with it whatever you want.

On the server side I can create messages and status bars because I know how far the script has advanced but the problem I am having is on the client side.

When the client selects a file that is BIG It takes a long time before the server script start running because it waits for the entire multipart/form_data data.

Now the question:

How can I know how far the clients computer has advanced in uploading the file?? This in the way of bytes sent are something like that. If I know this data I can create a progress bar.

Thanks in advance

Tom Briers
 
Old December 16th, 2003, 03:53 PM
Authorized User
 
Join Date: Nov 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

May be i'm wrong but check asynchrone task, it's used in web service for wait the response of the service without freeze the client. I think that you can do the samething buit i'm not sure.

Exarkuun

 
Old December 16th, 2003, 04:00 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

When the client uploads a file, they are creating a regular HTTP request to the server, but it happens to be way more gigantic than usual. Until the whole request has arrived at the server, I don't believe anything will happen with it. I don't even think the request will have started processing. So your server side code will not be able to determine anything about the upload status because by the time it starts running, the request is already at the server. I know of nothing that will allow you to do what you are trying to do. As soon as you hit "Submit", the browser's document is unaccessible so you could not even write something to the current page (i.e. the page where you selected the file and hit "Submit").

I think you might be out of luck. The best you could do is put a message stating that if you choose a really big file, it's going to take a while.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old December 16th, 2003, 04:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not too much into this, but Imar gives a link to a method of doing progress bars in this thread.

Naturally I has got nothing to do with the status of the upload, however the Response.Buffer = False and writing script to the document during the upload might get you some of the way.

Jacob.
 
Old April 15th, 2005, 03:11 AM
Registered User
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to v_siva_2000 Send a message via Yahoo to v_siva_2000
Default

hai dear,
visit there.
http://www.javazoom.net/jzservlets/u...ploadbean.html
-siva






Similar Threads
Thread Thread Starter Forum Replies Last Post
Progress Bar dotnetsathya VS.NET 2002/2003 0 September 26th, 2007 12:33 AM
Help me to show progress bar during file upload subhasps8 ASP.NET 2.0 Professional 5 June 27th, 2007 06:39 PM
upload progress bar jets Beginning PHP 1 October 1st, 2006 08:11 AM
upload file, progress bar ivris Servlets 0 July 21st, 2004 06:52 AM
upload file, progress bar ivris J2EE 0 July 21st, 2004 06:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.