I work for a small data archiving company. One of our customers uses your Co:Z SFTP Server, and they need data uploaded to a dataset. My code uses libcurl, which is a widely used library, but I don't seem to be able to do the "ls" command to set the dataset options before uploading the file. Do you have sample code using curl to upload a file with your server's extended commands?
I am supposed to issue a "ls /+{options}" command before sending the file, but when I do so using curl, I get an error that ls is not a valid sftp command. I sent it as a quote command as part of a send operation, but curl responds with "Unknown SFTP command"
I found this in the curl documentation:
The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd, rename, rm, rmdir, symlink (see curl (1)) (SFTP support added in 7.16.3)
Do I need to use some other curl operation to send the "ls" command, to handle getting a response (which I will probably ignore)? Or would I need to modify the curl source to skip validation on the quote commands so I can send vendor specific extensions? I'd worry about maintainability if I have to track changes to curl.
Thank you,
Kenny Ostrom
ImageHawk, Inc.
uploading to Co:Z SFTP with curl
Re: uploading to Co:Z SFTP with curl
As you note, curl doesn't support the ls command via its "quote" option.
I would recommend that you use a file pattern to set the DCB attributes for the transferred file if possible. This section of the user's guide describes how to do this:
http://www.dovetail.com/docs/sftp/sessi ... es_pattern
I would recommend that you use a file pattern to set the DCB attributes for the transferred file if possible. This section of the user's guide describes how to do this:
http://www.dovetail.com/docs/sftp/sessi ... es_pattern