curl-users
Problem with cURL via UNIX, and 0 byte files
Date: Mon, 06 Nov 2006 16:32:17 -0500
Howdy folks,
Total cURL newbie here. We're trying to use cURL via a UNIX shell script, to post a file to an HTTPS site. We're using the following syntax:
curl -f -F "Username=xxx" -F "Password=xxx" -F "UploadFile=@data.txt" https://url.aspx -o results.html
Obviously, the details have been changed to protect the innocent. :) Generally, this is working fine. Our UNIX script generates the data.txt file daily, and the cURL sends the file to our vendor.
In testing, however, we realized that if the data.txt file is not present on our side, the cURL will still send a 0-byte data.txt file. Are there any options within the cURL syntax that would prevent the cURL from sending a file if no local file exists? For now, we're just writing additional UNIX code to prevent the cURL from executing if the file is not present. But, I was just curious if there was anything within cURL that would take care of this.
Thanks!
Steve
Received on 2006-11-06