Android Question FTP problem with partially sent files .

Discussion in 'Android Questions' started by tigrot, Jun 1, 2015.

  1. tigrot

    tigrot Well-Known Member Licensed User

    Hi everybody,
    I'm using FTP to send images to our server. The android device is often in very "hard" places and comunication is not very well. During FTP trasfer the communication drops and partially sent files are left on server. Then we try to send files again there is already on partial file on server side and transfer fails.
    There are two ways: one is to restart transfer from last block or delete the file on server side.
    The first seem uninmplemented, the other requires a comand. There is also an override existance check on client side. What are the feasible solutions at present? Thank you!

    Regards
    Mauro
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Which error do you get when you try to overwrite an existing file?
     
  3. tigrot

    tigrot Well-Known Member Licensed User

    No special error, the uploadcompleted event signals: completed false and the partially transferred file is there till I delete it, then the transfer is able to end.
    Nothing is logged in system log.
    We could use a restart option(since the server is restartable) or a delete remote file on server if present.
    I use FTP contained in NET library.
    Grazie Erel!

    Mauro
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    What is the value of Log(LastException)?

    You should probably be able to configure the ftp server to allow overwriting existing files.
    You can also delete remote files with FTP.DeleteFile.
     
  5. tigrot

    tigrot Well-Known Member Licensed User

    To simulate line drop i shut off wi-fi on the fly. So no log... I.ll delete existing files before starting the trasfer to avoid conflicts. Tnx very much.
     
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