FTP file Upload
Posted: Fri Sep 13, 2013 10:57 am
Hi All
I tried the FTP file upload eaxample on
http://lessons.runrev.com/s/lessons/m/4 ... -using-ftp
This is the code:
But when I run it, it says the following:
"Button": execution error at line 22 (Chunk: no such object) near "1", char 47
Also is there a way to test if the FTP connection is working?
Thanks
Peter G
I tried the FTP file upload eaxample on
http://lessons.runrev.com/s/lessons/m/4 ... -using-ftp
This is the code:
When I apply it, it does not yield any errors and does not do anythingconstant FTPHOST = "My_FTP_Address"
constant FTPUSER = "My_User"
constant FTPPASS = "My_Password"
on mouseUp
# Start by getting the file to upload
local tFileForUpload
answer file "Select a file to upload"
put it into tFileForUpload
# Get the name of the file for upload
local tFileName
set the itemdel to "/"
put the last item of tFileForUpload into tFileName
# Connect the start the upload
local tDestination
put "ftp://" & FTPUSER & ":" & FTPPASS & "@" & "ftp.41.204.205.172/gagsoft/" & tFileName into tDestination
libURLftpUploadFile tFileForUpload, tDestination, "uploadComplete"
end mouseUp
on uploadComplete pURL, pStatus
put "Status Update:" && pStatus && return after field 1
end uploadComplete
But when I run it, it says the following:
"Button": execution error at line 22 (Chunk: no such object) near "1", char 47
Also is there a way to test if the FTP connection is working?
Thanks
Peter G