1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question FTP a network file?

Discussion in 'Android Questions' started by jeronimovilar, Apr 9, 2019.

  1. jeronimovilar

    jeronimovilar Member Licensed User

    is it possible to put (ftp) a net file using Android?
    example:
    Code:
    ftp.Initialize("ftp""your.server"21"user""password")
    ftp.UploadFile("\\192.168.0.100\folder""somefile"False"/somefile")
     
  2. DonManfred

    DonManfred Expert Licensed User

    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.
     
    Erel likes this.
  3. jeronimovilar

    jeronimovilar Member Licensed User

    :( Thank you
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    If a FTP server is running on the PC then it is possible to access it.
     
    DonManfred likes this.
  5. jeronimovilar

    jeronimovilar Member Licensed User

    No. My file is on the PC´s and server on Internet :(
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    I'm afraid that I don't understand the question in this thread. You can use the FTP library to upload files to any FTP server.
     
  7. jeronimovilar

    jeronimovilar Member Licensed 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.
    Code:
    ftp.Initialize("ftp""177.155.116.184"21"user""password")
    ftp.UploadFile("\\192.168.0.100\FolderShared""somefile"False"/somefile")
    is it clear?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Yes. DonManfred answer is the correct answer. You need to first download the file from the PC. You can do it with SMB or by running a FTP server on the PC.
     
  9. jeronimovilar

    jeronimovilar Member Licensed User

    OK. do you have a example using this SMB?
     
  10. DonManfred

    DonManfred Expert Licensed User

    You should start a new thread for any new question.
    Additionally you should check the available example first.
     
  11. jeronimovilar

    jeronimovilar Member Licensed User

    Thank you for your attention.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice