CSPro can connect to a File Transfer Protocol (FTP) server, using it as a
synchronization service. After connecting to an FTP server,
synchronization routines can transfer cases, files, and other data. FTP servers are useful for users conducting small- to medium-sized survey operations who are not able to configure the preeminent CSPro synchronization option,
CSWeb.
CSPro can work with FTP servers using encrypted transmission via
TLS/SSL. There are two modes that CSPro supports when using File Transfer Protocol Secure (FTPS): explicit and implicit. To use explicit TLS/SSL, provide a URL for the server that starts with
"ftpes://". To use implicit TLS/SSL, provide a URL for the server that starts with
"ftps://". For servers that do not support TLS/SSL, use a URL that starts with
"ftp://". FTP over SSH (SFTP) is not supported.
The resource of an FTP
connection string is the server URL. You can optionally specify a port number by adding it to the end of the URL, separated by a colon. For example, the URL
"ftp://example.org:27" tells CSPro to connect to port 27. If no port is specified, the standard FTP port will be used: 21 for FTP or 990 for FTPS.
The username and password can also be specified in the connection string. If the username and password are not specified, the user will be prompted to enter them the first time the connection is made.
These are options that can be specified in the connection string. Note that values must be
properly encoded based on the way that the connection string is defined (as a string, as a
JSON object, or as a
CSPro URI).
| Property Name and Values | Description |
| |
| "username" | The user's username. This is only used if a password is also provided. |
| |
| "password" | The user's password. Hardcoding passwords in applications is not recommended. This is only used if a username is also provided. |
The following are examples of how to create connections to FTP servers:
// CSPro will prompt for the username and password
syncconnect("ftpes://example.org");
// the credentials are specified using percent-encoding
// to properly account for any special characters
syncconnect(maketext(
"ftpes://example.org|username=%s&password=%s",
encode(PercentEncoding, "jackw"),
encode(PercentEncoding, "MyPa$$w0rd!")
));
When connecting to an FTP server, the username and password are stored in the operating system's secure storage and do not need to be entered again. You can use the
Manage Credentials dialog to manually clear these credentials.
If you are running the FTP server on the same machine that you are using for synchronization operations, you use the
Local Files synchronization service to speed up operations. Rather than connecting over the Internet to server, CSPro will directly access the contents of the server on the local machine. For example, if the root directory of the FTP server is located at
C:\surveys\ftp-server, you can connect directly using:
Once CSPro connects to a file-based synchronization service, it looks for or creates a directory named CSPro in the root directory, using it for the results of synchronization operations. CSPro uses the following directories: