Using libURLftpUplaod

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
exheusden
Posts: 170
Joined: Fri Oct 09, 2009 5:03 pm
Contact:

Using libURLftpUplaod

Post by exheusden » Sat Jan 09, 2010 11:31 pm

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.)

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Using libURLftpUplaod

Post by bangkok » Sun Jan 10, 2010 11:11 am

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.
Attachments
DOWNLOAD_UPLOAD.zip
(1.5 KiB) Downloaded 295 times

exheusden
Posts: 170
Joined: Fri Oct 09, 2009 5:03 pm
Contact:

Re: Using libURLftpUplaod

Post by exheusden » Sun Jan 10, 2010 11:17 am

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.

Post Reply