ftp_put — FTP put command; Virtuoso FTP client


integer ftp_put ( in server varchar ,
in user varchar ,
in pass varchar ,
in local_file_name varchar ,
in remote_file_name varchar ,
in is_pasv integer );


Virtuoso has FTP client functionality, that can be used inside Virtuoso/PL. This Virtuoso function mimics the FTP put command. As with any PL, this can be combined with Web Services and SOAP.



The remote server address or IP Address.


The username for authentication at the FTP server.


The accompanying password for authentication at the FTP server.


The full path and file name of the local file to be uploaded. This is relative to the server root directory. This directory must be included in DirsAllowed ACL list in the Virtuoso.INI file.


Full path and file name to the file on the FTP server to be uploaded.


Flag to specify whether to use passive mode. This can be one "1" for passive mode, or zero "0" for active mode. One "1" is assumed by default.

Return Types

This function returns either 1 for success, or the error returned from the server.


This function will return any errors returned by the remote FTP server.


Example24.121.Uploading a file to an FTP server

To upload the file virtuoso30.tar.gz to the ftp server, one can use:

select ftp_put ('', 'user_name', 'password', 'virtuoso30.tar.gz', 'virtuoso30.tar.gz');

This will upload the file that occurs on the local server root directory, and save it to the remote servers root directory.