ftpUpload ( string server , string login , string password , string pathServer , string pathDisk , int _chmod , int _port , string _protocol ) : void
Upload a file on your server by FTP.
Example
ftpUpload("68.258.354.12","admin","sd44f88t4h","/var/www/download/myFile.csv",path("tmp")+"csv.csv")
Tips
If you have an error, try to check the pathDisk exist, to do that, in debug mode, evaluate the pathDisk value and copy-paste it in the Windows Search (press Win and do Ctrl+V) and see if the file is displayed.Parameters
server
host
login
login of the server
password
password of the server
pathServer
on your server. Use / to separate directories.
pathDisk
Path of the file on your disk. Pay attention, use \ for Windows and / for Linux and Mac.
_chmod (optional)
ex:644
_port (optional)
default:21. For SFTP it is generally 22.
_protocol (optional)
default:"ftp"
Possible values:
• "ftp" : Normal FTP protocol
• "sftp" : Transfer over SSH
• "ftps" : Secure FTP or FTP over TLS/SSL (quite rare)
Possible values:
• "ftp" : Normal FTP protocol
• "sftp" : Transfer over SSH
• "ftps" : Secure FTP or FTP over TLS/SSL (quite rare)