Android Question Ftp.uploadFile

gigi0ne

Member
Licensed User
Longtime User
Hi to all

This routine returns a

java.lang.RuntimeException: Error uploading file.
550 /test/: Not a regular file

I can't understand why, if I send it with filezilla there is no problem
Can anyone give me a tip?

Thank's

B4X:
Sub SaveConfig
    kvs.Initialize( xui.DefaultFolder,"test.ini")
    Log(shared)
    [omissis ....]
    If File.Exists(  xui.DefaultFolder, "test.ini") Then
        Dim Ftp As FTP
        Ftp.Initialize("ftp", "ftp.xxxxx.it", 21, "xxxxx", "xxxx")
        Ftp.PassiveMode = True
        Dim sf as Object = Ftp.UploadFile( xui.DefaultFolder, "test.ini", False, "/test")
        Wait For (sf) ftp_UploadCompleted (ServerPath As String, Success As Boolean)
    End If
End Sub

Sub ftp_UploadCompleted (ServerPath As String, Success As Boolean)
    If Success Then
          Log("trasferiti")
       Else
         Log("errore "&ServerPath)
         Log(LastException.Message)
    End If
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
Dim sf as Object = Ftp.UploadFile( xui.DefaultFolder, "test.ini", False, "/test")

ServerFilePath - Full path to file that will be created on the server.

In your case you are trying to upload the File (on Serverside) /test
If you want to create test.ini in folder test then the parameter should be "/test/test.ini"
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
Better to start a new thread / question, rather than posting in very old thread.

 
Upvote 0
Top