FtpClient storeFile always return False

后端 未结 5 1482
醉话见心
醉话见心 2020-12-05 18:36

Please figure this out. The code runs properly without any exception.

        FTPClient ftp = new FTPClient();
        ftp.connect(server);
        if(!ftp.l         


        
5条回答
  •  执念已碎
    2020-12-05 19:43

    Topic is quite old but maybe I will help to any other. I compared what FileZilla sends to FTP server and my program did. I needed to use ftp.enterLocalPassiveMode() to make it work, ftp.pasv() no good :)

    And for debugging is better to use getReplyString() than only getReplyCode()

提交回复
热议问题