curl-library
Re: Resume Upload Problem
Date: Fri, 6 Dec 2002 14:34:54 +0100 (MET)
On Wed, 4 Dec 2002, Juan Ignacio Hervás wrote:
> I am trying to upload files using curl-library as an FTP CLIENT and I find
> problems when I try to resume a broken upload. The situation is this: When
> I find than there is a file with the same name and less size in the
> destination folder (I am not checking date and time yet), I get the size
> and try to append to the target beginning at that position. Sometimes I get
> this error: "Upload unaligned file size" but usually I don't receive any
> error but the transfer overwrite from the beginning and the final file is
> completely wrong!
If you detect the situation, I'd suggest that you just seek to correct
position in your local file and then upload the rest of it with
CURLOPT_APPEND and an INFILESIZE that is the rest of your local file.
> II will be very grateful if anybody can help me or send me any example.
If you could show us a trace of what happens when you do this, it would help
us a lot more to understand what the problem is and how to correct it.
Use CURLOPT_DEBUGFUNCTION for that.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2002-12-06