BE_FTP_UploadFile

BE_FTP_UploadFile ( url ; pathToFile {; username ; password } )

Uploads the to the ftp url specified, from the pathToFile.

Version : 4.2

Parameters : 
url : the ftp url to upload to. 
pathToFile : the plugin path on disk. 
username ( optional ) : The username if the url requires authentication. 
password ( optional ) : The password if the url requires authentication.

Authentication types can be set with the BE_CurlSetOption function.  You can also set it to create folders that don't exist by setting this flag before upload :

BE_CurlSetOption ( "CURLOPT_FTP_CREATE_MISSING_DIRS" ; "1" )

Check for errors using the BE_GetLastError function and use https://curl.haxx.se/libcurl/c/libcurl-errors.html for error details.

Examples :

BE_FTP_UploadFile ( "ftp://example.com/path/folder/myfilname.txt" ; "/Volumes/HD/Path/To/myfilname.txt" )
BE_FTP_UploadFile ( "sftp://example.com:2000/path/folder/myfilname.txt" ; "/Volumes/HD/Path/To/myfilname.txt" ; "account" ; "password" )

Still need help? Contact Us Contact Us