Android Question file uploading with filesize 0 kb

manuaaa

Member
Licensed User
Longtime User
kindly help me,

After running the below mentioned commend the file is uploading but the file size is 0 kb. kindly help.



If comm.CheckConnection Then
currentfilesize = File.Size(File.DirInternal, "32556365.jpg")
PB.Visible = True
percent.Visible = True

Dim sf As Object = FTP.UploadFile(File.DirInternal, "32556365.jpg", False, "/Html/IMG/32556365.jpg")
Wait For (sf) FTP_UploadCompleted (ServerPath As String, Success As Boolean)
If Success Then
Log("file was uploaded successfully")
Else
Log("Error uploading file")
End If

Else
MsgboxAsync ("No Internet Connection - Please check Net Connection", "Connection Error")
End If Log(File.DirInternal)
End Sub
 

teddybear

Well-Known Member
Licensed User
I guess you would like to upload file to httpserver using ftp client
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
 
Upvote 0

manuaaa

Member
Licensed User
Longtime User
1. Please use CODE Tags when posting code!
2. Which line you got in the LOG?
IN MY NET FOLDER THE FILE NAME IS SHOWING. WITH 0 KB FILE SIZE.
1. Please use CODE Tags when posting code!
2. Which line you got in the LOG?
B4X:
If comm.CheckConnection Then
currentfilesize = File.Size(File.DirInternal, "32556365.jpg")
PB.Visible = True
percent.Visible = True

Dim sf As Object = FTP.UploadFile(File.DirInternal, "32556365.jpg", False, "/Html/IMG/32556365.jpg")
Wait For (sf) FTP_UploadCompleted (ServerPath As String, Success As Boolean)
If Success Then
Log("file was uploaded successfully")
Else
Log("Error uploading file")
End If

Else
MsgboxAsync ("No Internet Connection - Please check Net Connection", "Connection Error")
End If Log(File.DirInternal)
End Sub
 

Attachments

  • FILEZILA.jpg
    424.5 KB · Views: 76
Upvote 0

teddybear

Well-Known Member
Licensed User
As DonManfred said Post #4, did you set passiveMode to true?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…