cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Shell Syntax to Force Binary Transfer (Upload)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 21 May 2008 22:16:34 +0200 (CEST)

On Wed, 21 May 2008, Christiansen Stephen wrote:

Please don't top-post. It ruins proper mail reading.

> Thanks, although I thought all was well I'm still running into a problem
> where my end of lines seem to be changing.

Hardly. It probably _does not_ change your newlines and that may be your
problem.

> Just to make sure it's not this process, I'd like to explicitly include
> --data-binary, if this is possible, with... I just don't know how to do
> it...

--data-binary is for sending HTTP POST. You're talking FTP so that option is
not for you. curl still does binary transfers by default so you don't need to
do anything to "enforce" binary. You can use -v or --trace(-ascii) to verify
this.

> curl -T /TempUploads/UserFolder/mynewfile.txt -u ftpuser:passwd
> ftp://ftp.myurl.com/test/

That will perform a binary transfer. Appending ";type=i" to the FTP URL is a
way to enforce binary transfer, but for your command line it won't make any
difference since it already is using binary.

-- 
  / daniel.haxx.se
Received on 2008-05-21