B4J Question FTP upload

Drago Bratko

Active Member
Licensed User
Longtime User
I have FTP server on non standard port (5021).
To that FTP server I can connect and do actions with FileZilla.
When I try to connect and do upload with jNet FTP, it reports this error:
java.lang.RuntimeException: Error uploading file.
500 Illegal PORT range rejected.
at anywheresoftware.b4a.net.FTPWrapper$2.run(FTPWrapper.java:241)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Sample code would be :
B4X:
Dim ftp As FTP
ftp.Initialize("ftp", "aaa.nnn.biz", 5021, "ftp-user", "somepwd")
ftp.UploadFile(File.DirApp, "file.zip", False, "/file.zip")

With FTP server which operates on standard port 21 same code works fine.

Is there solution to be able to operate with FTP which is not on standard FTP port?
 
Top