Android Question FTP a network file?

jeronimovilar

Active Member
Licensed User
Longtime User
is it possible to put (ftp) a net file using Android?
example:
B4X:
ftp.Initialize("ftp", "your.server", 21, "user", "password")
ftp.UploadFile("\\192.168.0.100\folder", "somefile", False, "/somefile")
 

DonManfred

Expert
Licensed User
Longtime User
ftp.UploadFile("\\192.168.0.100\folder", "somefile", False, "/somefile")

Probably no.
- As the \\path is a Networkpath you need to access this path using SMB library first (the FTP Library does not have access to any SMB Resource).
- Download the fileto your device
- and then you can upload it to FTP.

If the SMB Library is not working for you as you need to use SMB 2 Protocol: You can try my jcifs-ng Library.
 
Upvote 0

jeronimovilar

Active Member
Licensed User
Longtime User
- my app is on smart and tablet
- connect to my FTP server is ok.
- the PC and the smart/tablet is on INTRANET
- the FTP server is on INTERNET
- If my file on smart to upload is ok, but...
but i need to upload a file that is on PC (\\192.168.0.10\folder shared\file.txt) to FTP Server (177.55.116.184) using my android app.
B4X:
ftp.Initialize("ftp", "177.155.116.184", 21, "user", "password")
ftp.UploadFile("\\192.168.0.100\FolderShared", "somefile", False, "/somefile")

is it clear?
 
Upvote 0
Top