Page 1 of 1

Using libURLftpUplaod

Posted: Sat Jan 09, 2010 11:31 pm
by exheusden
I am now trying to ftp a local file to a server, using the libURLftpUpload command, as follows:

Code: Select all

libURLftpUploadFile filePath, "ftp://myUserName:myPassword@users.telenet.be/folder/file.html", "Events upload completed."
(with substitution of myUserName, myPassword and folder/filename, of course).

The command is certainly executed, but nothing is uploaded, nor do I receive any form of message, either "Events upload completed" or even an error (which would be better than nothing!).

Uploading the same file to the same server (same username and password, same paths, etc.) using a put shell(curlScript) in SC works (curlScript contains the cutrl -T command together with the necessary parameters), so the server is working correctly (I can also view it with Transmit, for example).

Presumably I have a syntax error in the libURLftpUploadFile command, even though it compiles correctly and does not return a runtime error.

Or do I understand the libURLftpUploadFile command incorrectly?

(I've read the explanations in the Users Guide and the Dictionary. In the Users Guide, the suggested link for more information (I think it means more information on this matter, too): http://www.runrev.com/developers/explor ... -internet/
returns a "page not found" error.)

Re: Using libURLftpUplaod

Posted: Sun Jan 10, 2010 11:11 am
by bangkok
exheusden wrote:

Code: Select all

libURLftpUploadFile filePath, "ftp://myUserName:myPassword@users.telenet.be/folder/file.html", "Events upload completed."
Could it be the space and the dot in your "upload completed" handler's name ?

Anyway. Here is a stack with download and upload (with progress bar). Both are working.

Re: Using libURLftpUplaod

Posted: Sun Jan 10, 2010 11:17 am
by exheusden
Bangkok, that might well be it! I didn't realise that that was supposed to be a handler name -- I thought it was a return string. I'll try with a proper handler name. Thanks for the idea.

Also thanks for the project -- will take a look at it.