http://lessons.livecode.com/m/4071/l/69 ... -using-ftp
I have succesed to create FTP client with livecode
Then I test it from local host in PC (Windows 7) and it works
Then I test it from another PC (windos7) in the Network and it's works
But when I test on Andoid
IT'S STILL NO LUCK
here is the code
Code: Select all
on mouseUp
put field ip_fld into tIP
put field user_fld into tUser
put field password_fld into tPassword
# Start by getting the file to upload
local tFileForUpload, tFileName
answer file "Select a file to upload"
put it into tFileForUpload
# Get the name of the file for upload
set the itemdel to "/"
put the last item of tFileForUpload into tFileName
put empty into field status_fld
# Connect the start the upload
local tDestination
put "ftp://" & tUser & ":" & tPassword & "@" & tIP&"/" & tFileName into tDestination
//put "ftp://" & FTPUSER & ":" & FTPPASS & "@" & "localhost/" & tFileName into tDestination
libURLSetStatusCallback "uploadProgress", the long ID of me
libURLftpUploadFile tFileForUpload, tDestination, "uploadComplete"
end mouseUp
on uploadComplete pURL, pStatus
put "Status Update:" && pStatus && return after field status_fld
end uploadComplete
on uploadProgress pURL, pStatus
put "Status Update:" && pStatus && return before field status_fld
end uploadProgress