Not uploading file and no Error Message getting

manuaaa

Member
Licensed User
Longtime User
Not uploading file and no Error Message getting
Hi,

My file is not uploading and not getting and error message, Please help.

My code is as follows:

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim FTP As FTP
Dim Button1 As Button
Dim Button2 As Button
Dim Button3 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
If FirstTime Then
FTP.Initialize("ftp", "ftp.xxxxx.in", 21, "xxxxxx", "xxxxxxx")
End If
Activity.LoadLayout("sa")
End Sub


Sub Button1_Click
FTP.UploadFile(File.DirRootExternal, "1.jpg", True, "/IMG/1.jpg")
'ftp1.UploadFile(File.DirRootExternal, "1.jpg", True, "/IMG/1.jpg")
'ftp1.Close
'ftp1.List
'If ftp1.IsInitialized Then
'Msgbox("good", "")
'End If
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

Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then Log(LastException.Message)
End Sub
Sub Button3_Click
FTP.List("/")
End Sub
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
Log(ServerPath)
If Success = False Then
Log(LastException)
Else
For i = 0 To Folders.Length - 1
Log(Folders(i).Name)
Next
For i = 0 To Files.Length - 1
Log(Files(i).Name & ", " & Files(i).Size & ", " & DateTime.Date(Files(i).Timestamp))
Next
End If
End Sub

Please help me to upload file.

thanks in advance
Edit/Delete Message
 

manuaaa

Member
Licensed User
Longtime User
Now uploading file

Dear Erel,

I am trying to upload file directly from device (Useing Samsumg Galaxy Ace). not getting any error and not uploading the file also.

Please help me

Thanks in advance.


Manuaaa
 

manuaaa

Member
Licensed User
Longtime User
Dear Erel My project Enclosed

Dear Erel,

Please find attached herewith my project pl check it and let me know how to upload a file from device to web server.

Thanks in advance
 

Attachments

  • upload.zip
    7.6 KB · Views: 179

manuaaa

Member
Licensed User
Longtime User
Now I can Upload Photo !!!! New problem come up

Thanks Erel,

Now I can upload photo but the new problem come up. The picture uploaded is
not showing properly.

Please help me.

Thanks in advance

Manoj
 
Top