Page 1 of 1

Passive FTP

Posted: Sun Feb 16, 2014 12:05 pm
by doobox
Hi there,

I am having some difficulty reliably uploading files to a server (dependant on the server).

I have wrote my code, and all works as expected on 1 server (a run-rev server).

But on another server of mine, i get sometimes a socket timeout message.
Normally though i just see "error" in the status callback.
I have double checked the full contents of the var tFtpDetails for the second server and they are correct and identical to the settings i use in forklift to connect to that server.
The only difference being that forklift uses passive mode.

Code: Select all

put "ftp://" & tUsername & ":" & tPassword & "@" & tFtpServer & tPort & tRemotePath &"/appcasts/appcast.php" into tFtpDetails
libURLSetStatusCallback "uploadProgress", the long ID of me
libURLftpUpload tAppcastPhp,tFtpDetails,"uploadComplete"
So what is passive mode really..?
And can i enable it in live code, so that any ftp actions are done in passive mode.?

I can not think of anything else that could be the issue.

Re: Passive FTP

Posted: Sun Feb 16, 2014 4:18 pm
by Mark
Hi Gary,

You can change the mode with libUrlSetFtpMode.

Kind regards,

Mark

Re: Passive FTP

Posted: Sun Feb 16, 2014 5:18 pm
by doobox
Thanks Mark. It's a big library, and i totally missed that function when scanning through the docs. I'll give it a whirl :-)