curl-library
RE: problem with file post progress
Date: Thu, 29 Dec 2005 09:19:28 -0500
Are you SURE that the file hasn't been uploaded. The server has to
process the file before it can return a success or failure notice. Curl
will wait for the reply from the server to say upload successful.
What I've done in a similar situation is to switch the message I display
to the user from "Uploading..." to "Server Processing..."
That being said.... It also looks like you might be calculating the %
wrong
In C, this is what I use in my progress callback function.
PctDone = (int)(((double)dlnow / (double)dltotal) * 100);
Could you post your callback function for others to check?
Brad Bruce
-----------------------------------------------------
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced
-----------------------------------------------------
-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Brad Culberson
Sent: Wednesday, December 28, 2005 4:58 PM
To: curl-library_at_cool.haxx.se
Subject: problem with file post progress
i am using a progress function to try to see the % complete of an http
post (containing a file). the function is getting called and i am
getting values for the data uploaded, downloaded... but it almost
immediately goes to 100% way before it is really finished...
i have the debug output below...
any help is greatly appreciated.
Thanks,
Brad
Uploading data.
Uploaded 0/134770
Downloaded 0/0
Percent Complete: 0
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 0/0
Percent Complete: 100
Uploaded 134770/134770
Downloaded 497/497
Percent Complete: 100
Uploaded 134770/134770
Downloaded 497/497
Percent Complete: 100
Upload successful.
NOTICE: This e-mail and any attachment may contain confidential and/or legally privileged information. If you are not the intended recipient, you must not review, retransmit, print, copy, use or disseminate it. Please immediately notify us by return e-mail and delete it along with any attachment and do not retain a copy. If this e-mail contains a forwarded e-mail or is a reply to a prior e-mail, the contents may not have been produced by the sender and therefore we are not responsible for its contents.
This notice is automatically appended to each e-mail. It is the recipient's responsibility to take measures to ensure that this e-mail is virus free, and no responsibility is accepted by us for any loss or damage arising in any way from its use.
Received on 2005-12-29