New FTP library, Beta Tester Needed

margret

Well-Known Member
Licensed User
Longtime User
I have a new FTP library almost completed and need a Beta tester for testing this lib. It is very raw and almost no testing has been done. You will need to have B4A 2.52. If you are interested and can do some testing right away, please let me know.

This will be posted to the fourm once it has been tested/fixed, etc.

Thanks:D
 
Last edited:

walterf25

Expert
Licensed User
Longtime User
FTP Beta Test

Hi Margret, I just tried it again with the new library files you e-mailed me but i get this error now, the code looks like this!

B4X:
Sub Button1_Click
ftp.Initialize(Activity, "ftp.garagesale.vacau.com", "username", "password", 21, True)

ftp.DownLoadFile(File.DirDefaultExternal, "public_html/", "garage.php", False)   
End Sub

and i get this error, it kind of makes me think that it is looking for the directory in the SD card rather than on the server!


scrnshot4.jpg

cheers,
Walter
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
Is the public_html a sub folder on the server or is public_html the root folder you are setting in when you log onto the server.

This is a line I am using now and it works fine:
B4X:
FTP.DownLoadFile(File.DirInternal, "test/files/", "plane.jpg", False)

Test is a folder in the root of the server and files is a folder under the Test folder.
 
Last edited:
Upvote 0

walterf25

Expert
Licensed User
Longtime User
FTP Beta Test

"public_html" is a subfolder, but when i use the
B4X:
ftp.UploadFile(File.DirRootExternal, "public_html", "frame0.jpg")

it works without telling it the root folder, so why doesn't the "DownloadFile" functions works the same way.

I tried two ways.
the first one is like this which gives me the error i posted in my previous post

B4X:
ftp.Initialize(Activity, "ftp.garagesale.vacau.com", "username", "password", 21, True)
ftp.DownLoadFile("", "public_html/", "garage.php", False)

and this other way which gives me a dialog box which says "Mask for files" and when i click in the given option it then shows me another dialog box that says Files Found, but it shows me no files.

B4X:
ftp.Initialize(Activity, "ftp.garagesale.vacau.com", "username", "password", 21, True)
ftp.DownLoadFile("", "/", "garage.php", False)
 
Last edited:
Upvote 0

walterf25

Expert
Licensed User
Longtime User
FTP Beta Test

I get the same error posted on the picture two posts back, and this is what i get on the logs

Downloaded: /public_html/public_html/garage.php, Success=false
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
FTP Beta Test

Uhmmm, ok so there is probably something going on on my server side, anyhow i tried creating another directory and i get this error!

** Service (advancedwidget) Start **


No AppWidget Ids found!
** Service (advancedwidget) Start **


No AppWidget Ids found!
** Service (advancedwidget) Start **


No AppWidget Ids found!
** Service (advancedwidget) Start **


No AppWidget Ids found!


** Activity (main) Create, isFirst = true **


** Activity (main) Resume **
Uploaded: /public_html/frame0.jpg, Success=true...
main_button1_click (B4A line: 47)
ftp.MakeDir("walter")
java.lang.NoSuchMethodError: anywheresoftware.b4a.net.FTPWrapper.SendCommand


at ADR.acti.ftpclass._vvvv2(ftpclass.java:938)
at com.genesis.ftpbetatest.main._button1_click(main.java:297)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:155)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:151)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:55)
at android.view.View.performClick(View.java:2485)
at android.view.View$PerformClick.run(View.java:9089)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)


at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
I think I just found the issue. I tested it on my server and got the same message as you. The names are CASE sensitive. Make sure your download folder and the .php filename are cased just as they are on the server. Log into your server with your PC and make sure of the case on the file and folder name and try it just like that. This must be an Android thing.

I haven't see this:

No AppWidget Ids found!
** Service (advancedwidget) Start **

Are you using B4A 2.52?
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
FTP Beta Test

Ok, I double checked the names on my server and they are cased just as i'm writing them on the app, and yes i'm using Basic4Android 2.52, as i mentioned before i'm able to upload files without any problem, the issue is when i try to download a file from the server to the phone.

I will be off in about 15 minutes, i can continue testing later tonight if you'd like, for now i have some stuff to do :D

I can be reached through e-mail any time though!

cheers,
Walter
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
I am still working on this. My lib uses the core FTP from the Net.lib. Your server is returning the path along with the file name and this is where the problem is coming from and why we see the path twice.

The core list function from the Net.lib says it only returns the folder and file names from the current directory. This is not the case with your server. This may be a bug in the core lib or an issue with the server. However, I am checking some things now as this may happen on many servers and we may have to handle it in my lib by parsing the files() list to correct the issue. I will update again as soon as I have a little more info.
 
Upvote 0
Top