How to do FTP push in TRTH

Greetings everyone

I am trying to use FTP push to retrieve data but seems the TRTH server can't access to my FTP site, as the request status was staying in 'uploading' and no result arrived.

Then I tried to run code of FTPExample, and found below error to use FTP push:

Client FTP error --> Failed to connect to ftp:21 - eval failed: (Couldn't create new FTP object: Net::FTP: Bad hostname)

Any suggestion to create a valid FTP site for pushing method please?

Best Answer

  • @Leon.Hong

    It looks like TRTH server unable to connect to your FTP server so it can't push test file on your FTP. Bad hostname indicate that it can't resolve your hostname and I guess that it's because you are using hostname("FTP") which is FTP server in your local network. As far as I understand using FTP Push you have to use FTP server on public network. Please check your server name again.