Problem uploading to FTP with curl

Greetings,

I use the following droplet script for transferring zipped files one at a time.


-- properties of ftp server
property userName : "user"
property password : "pw"
property server : "address"
property targetDir : "/"
property nl : ASCII character 10


on open theDroppedFile
	
	set command to "curl -T " & server & ""
	set command to "ftp -n " & server & userName & ":" & password & "
	cd " & targetDir & nl & "
	binary" & nl
	
	do shell script (command)
	
end open

I can transfer files up to 3 or 4 MB all day long. But if the file is larger, it will not upload.

Is there something else I should be doing with my script?

Hi,

Is ‘binary’ the content of your file? If so your answer probably the one to “How long can my command be?” on this page:
http://developer.apple.com/technotes/tn2002/tn2065.html

Best wishes

John Maisey
www.nhoj.co.uk

molinus,
I’m not quite sure how you are doing the ftp up, but here is how I do it:

set TheFile to "~/Desktop/Hyperspace1.1.2.dmg"
set logOn to "USERNAME:PASSWORD"
set theDestination to " ftp://SERVERNAME"
do shell script "curl -v -T " & "" & TheFile & "" & " -u " & "" & logOn & "" & "" & theDestination & ""

The Hyperspace file is a 10mb so I know that it would probably do a much larger size of file. Hopefully this will give you an idea of how to take it further.
chuck