FTP uploads with curl - monitoring progress - any ideas?
Ken Ray
kray at sonsothunder.com
Thu Mar 4 13:28:42 EST 2010
I have some large files (100MB +) that I need to FTP to a customer's server.
I have tried to use libURL to do the uploading, but I get odd results/random
timeouts/errant status messages when the file I'm uploading is over 40MB.
I've tried many different workarounds to this, but none have been
consistent/acceptable so for this project I'm seeing if I can use curl.
The pain is that there doesn't seem to be a way to retrieve the progress of
an FTP upload so I can display a custom upload box. If I redirect it to
dev/null, I get control back after the upload starts, but I can't get any
progress data:
curl -T filePath -u user:pass serverAdress > /dev/null 2>&1 &
If I redirect to stdin, it's blocking and I only get anything when the
upload is complete:
curl -T filePath -u user:pass serverAdress > stdin
I've also tried:
curl -T filePath -u user:pass serverAdress > stdin &
curl -T filePath -u user:pass serverAdress > stdin 2>&1 &
Is there any way to make a non-blocking call to curl, but then to get back
the progress text that would normally be displayed in the Terminal?
Any help would be appreciated...
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list