Name: libURLSetFTPMode

Type: command

Syntax: libURLSetFTPMode {"active" | "passive"}

Summary: Switches between active and passive mode for FTP transfers.

Introduced: 1.1.1

OS: mac,windows,linux

Platforms: desktop,server,web

Security: network

Example:
libURLSetFTPMode "passive"

Example:
libURLSetFTPMode (the hilitedButtonName of group "Mode")

Description:
Use the <libURLSetFTPMode> <command> to improve performance with FTP <server|servers> that require active mode.

For most FTP servers, passive transfer mode will work without a problem. However, a few servers require transfers to be made in active mode. If you are having trouble with <ftp> <command|commands> with a particular <server>, try setting the mode to "active".

The FTP mode is set to passive when the application starts up. To use active mode exclusively, execute the following statement before making any <ftp> transfers:

  libURLSetFTPMode "active"

>*Important:*  The <libURLSetFTPMode> <command> is part of the <Internet library>. To ensure that the <command> works in a <standalone application>, you must include this <Revolution custom library|custom library> when you create your <standalone application|standalone>. In the Inclusions section of the <Standalone Application Settings> window, make sure "Internet Library" is selected in the list of script libraries.

>*Note:* When included in a <standalone application>, the <Internet library> is implemented as a hidden <group> and made available when the <group> receives its first <openBackground> message. During the first part of the <application|application's> startup process, before this <message> is sent, the <libURLSetFTPMode> <command> is not yet available. This may affect attempts to use this <command> in <startup>, <preOpenStack>, <openStack>, or <preOpenCard> <handler|handlers> in the <main stack>. Once the <application> has finished starting up, the <library> is available and the <libURLSetFTPMode> <command> can be used in any <handler>.

References: ftp (keyword), startup (message), openBackground (message), preOpenStack (message), openStack (message), preOpenCard (message), libURLftpUpload (command), libURLSetFTPStopTime (command), command (glossary), main stack (glossary), handler (glossary), message (glossary), group (glossary), standalone application (glossary), Standalone Application Settings (glossary), server (glossary), application (glossary), Internet library (library), Revolution custom library (library), library (library)

Tags: networking
