XojoCloud and FTP API 1 CURLSMBS

Hi again,
First off , I know FTP should be a no no but t’is not of my doing. I am trying to get the accounting company to set up SFTP but not very hopeful.
So, it was suggested that I use CURLSMBS which works fine locally when debugging BUT not yet on Xojo cloud, because I don’t know which outgoing port to use.
I suppose I could open a whole bunch of outgoing ports :joy:
Any further suggestion?
Thanks in advance…

Check OptionLocalPortRange to tell CURL a range of ports you opened for FTP.

I think as standard, FTP uses 21 while SFTP uses 22.

Problem solved, at least on an ftp server for testing. I just needed the EPRT option

var fwp as new XojoCloud.FirewallPort(21,xojocloud.FirewallPort.Direction.Outgoing)
if fwp.isopen then

var cmbs as new CURLSMBS
cmbs.SetInputData(endofline+“Positive Thinking Might Get Me Somewhere”)

var i as integer =cmbs.Perform
msgbox “fooled again”
end if

1 Like

Great. Tons of servers have different FTP implementation, which causes us to have a few flags, where you switch until it works.