imbault Well-Known Member Licensed User Longtime User Jul 13, 2015 #1 Hi, Using FTP object, I've got a error Program started. true C:\b4j\sqltocsv\Objects java.lang.RuntimeException: Error uploading file. 550 Access is denied. at anywheresoftware.b4a.net.FTPWrapper$2.run(FTPWrapper.java:219) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) /, Success=false java.lang.RuntimeException: Error uploading file. 550 Access is denied. Click to expand... While, the same credentials and passive mode on FileZilla uploads like a charm, Here is the code (simple) Code: Copy cFile1="BAQ_liste_analyses_L14_S107_150710_112605.csv" Log( File.Exists(File.DirApp,cFile1)) oFTP.Initialize("FTP", FTP_Server, 21, FTP_User, FTP_Password) oFTP.PassiveMode = True oFTP.UploadFile(File.DirApp, cFile1, True, "/" ) Does anyone has an idea??? B4J V3.00 jNet Lib V 1.10
Hi, Using FTP object, I've got a error Program started. true C:\b4j\sqltocsv\Objects java.lang.RuntimeException: Error uploading file. 550 Access is denied. at anywheresoftware.b4a.net.FTPWrapper$2.run(FTPWrapper.java:219) 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) /, Success=false java.lang.RuntimeException: Error uploading file. 550 Access is denied. Click to expand... While, the same credentials and passive mode on FileZilla uploads like a charm, Here is the code (simple) Code: Copy cFile1="BAQ_liste_analyses_L14_S107_150710_112605.csv" Log( File.Exists(File.DirApp,cFile1)) oFTP.Initialize("FTP", FTP_Server, 21, FTP_User, FTP_Password) oFTP.PassiveMode = True oFTP.UploadFile(File.DirApp, cFile1, True, "/" ) Does anyone has an idea??? B4J V3.00 jNet Lib V 1.10
Erel B4X founder Staff member Licensed User Longtime User Jul 13, 2015 #2 Recheck the user name, password and port. It is also possible that FileZilla uses a different protocol (SFTP for example). Upvote 0
Recheck the user name, password and port. It is also possible that FileZilla uses a different protocol (SFTP for example).
imbault Well-Known Member Licensed User Longtime User Jul 13, 2015 #3 Thanks Erel, the problem was elsewhere as usual so, I post it, because it could help someone else: FTP.UploadFile last parameter is ServerFilePath - Full path to file that will be created on the server. In that case ServerFilePath must contain also the file created on the FTP target site So working code (is that case) is: Code: Copy cFile1="BAQ_liste_analyses_L14_S107_150710_112605.csv" Log( File.Exists(File.DirApp,cFile1)) oFTP.Initialize("FTP", FTP_Server, 21, FTP_User, FTP_Password) oFTP.PassiveMode = True oFTP.UploadFile(File.DirApp, cFile1, True, "/" & cFile1 ) Upvote 0
Thanks Erel, the problem was elsewhere as usual so, I post it, because it could help someone else: FTP.UploadFile last parameter is ServerFilePath - Full path to file that will be created on the server. In that case ServerFilePath must contain also the file created on the FTP target site So working code (is that case) is: Code: Copy cFile1="BAQ_liste_analyses_L14_S107_150710_112605.csv" Log( File.Exists(File.DirApp,cFile1)) oFTP.Initialize("FTP", FTP_Server, 21, FTP_User, FTP_Password) oFTP.PassiveMode = True oFTP.UploadFile(File.DirApp, cFile1, True, "/" & cFile1 )