Android Question ftp images fail

Discussion in 'Android Questions' started by Kahapdos, Apr 17, 2015.

  1. Kahapdos

    Kahapdos Member Licensed User

    hi good day
    I'm trying to upload an image via ftp.
    and the image if you upload to the server but arrives damaged.

    the image if it exists in the specified directory but arrives damaged.
    which may be the cause?


    Code:
    Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("captura")
    ftp1.Initialize(
    "ftp1","ftp.xxxxx.com",21,"xxxxxxxxxxxxxx","xxxxxxxxxx")
    End Sub

    Sub Button2_Click
    ftp1.UploadFile(
    File.DirRootExternal,"1.jpg",True,"/1.jpg")
    ftp1.Close
    End Sub
     
    Last edited: Apr 17, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    Are you handling the UploadCompleted event?
     
  3. Kahapdos

    Kahapdos Member Licensed User

    Yes I use uploadcompleted event but the picture arrives damaged.
    the image on the server has the correct weight, but damaged and can not open
     
  4. giga

    giga Well-Known Member Licensed User

    (As a test) Have you tried a text document to see if it arrives damaged?
    Is this happening on ALL images or only certain one(s)?
    Also what is the size of the image and what program are you using to open it on the server?
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    You should set the AsciiFile parameter to false.
     
  6. pascalv

    pascalv New Member Licensed User

    Please, tell us how to set the AsciiFile parameter to false ? ( using Net library)
    Tks

    SOLVED using NetExtras library...
     
    Last edited: May 12, 2015
  7. Erel

    Erel Administrator Staff Member Licensed User

    It is the third parameter in DownloadFile / UploadFile calls.
     
    DonManfred likes this.
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