Search

Upload file to FTP

Last Updated: Mar 8, 2023

Articles

Use this function to upload file to FTP server.

Syntax

Upload file to FTP (host, protocol, port, username, password, fid, local_file_path, remote_directory_path )

Parameters

Input Parameter Name Description
host FTP server host name
protocol FTP protocol, Supported values are: “FTP” and “SFTP”
port Port number of the FTP server
username Username for the FTP server connection
password Password for the FTP server connection
fid Input File ID, if uploading from file server
local_file_path Input file path, if uploading from local file system
remote_directory_path Target FTP server directory

  • You can enter either fid or local_file_path.
  • While using fid, enter N/A for local_file_path and vice versa.
  • Enable Run On Server option while using FID.
  • Port number for SFTP is 22 and FTP is 21.

Returns

Return value Description
Path Returns remote path of the uploaded file

Sample

Upload file to FTP (10.151.1.xxx, sftp, 22, user1, xxxx, f6e7391f-dfbe-4b57-90ce-04026fcb2xx, N/A, /home/jiffyapp-usr/AllFunctions/download/)

  • Uploads file of the specified fid to SFTP server.

Upload file to FTP (10.151.1.246, ftp, 21, user1, xxxx, N/A, C:\invoice.pdf, /home/jiffyapp-usr/AllFunctions/download/)

  • Uploads file to FTP server from the specified local file path.

To view all the general functions, click here.

Did you find what you were looking for?