Android Question FTP uploading problem

bixmatech

Member
Licensed User
Hi ...
I'm trying to upload images to my server using FTP (Net library) ,But after the image upload . I try to open it from my server ,But it doesn't work. Llike crash it when uploading

B4X:
Sub StartUploading_medias

    PahtsFilesOnServer.Add(OnlineFolder & "/" & Names.Get(PathsIndex))
    FTP.UploadFile(Pahts.Get(PathsIndex), Names.Get(PathsIndex), True, OnlineFolder & "/" & Names.Get(PathsIndex))
End Sub

Sub FTP_UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long)
    Dim s As String
    s = "Uploaded " & Round(TotalUploaded / 1000) & "KB"
    If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
    Log(s)
End Sub

Library version: Net 1.62
B4A : 6.8


Thank you ...
 

bixmatech

Member
Licensed User
this is the UploadCompleted event

B4X:
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
   Log(Success)
  
   If Success = False Then
     Log(LastException.Message)
   End If

and this is the log

** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Uploaded 1KB
Uploaded 2KB
Uploaded 3KB
Uploaded 4KB
Uploaded 5KB
Uploaded 6KB
Uploaded 7KB
Uploaded 8KB
Uploaded 8KB
true


where is my wrong ?

thank you ...
 
Upvote 0
Top