FTP Upload
Posted: Mon Oct 28, 2013 7:20 pm
Hi Guys
I would really appreciate it if someone could just tell me what is wrong with my code.
I am pretty sure my ftp address, username amd password is correct because I am using it on a daily bases.
When running the test I get "Status Update: error "

I would really appreciate it if someone could just tell me what is wrong with my code.
I am pretty sure my ftp address, username amd password is correct because I am using it on a daily bases.
When running the test I get "Status Update: error "
Code: Select all
constant FTPHOST = "ftp.An IP address"
constant FTPUSER = "my user"
constant FTPPASS = "my passowrd"
on mouseUp
# 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 1
# Connect the start the upload
local tDestination
put "ftp://" & FTPUSER & ":" & FTPPASS & "@" & "/gagsoft/" & 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 1
end uploadComplete
on uploadProgress pURL, pStatus
put "Status Update:" && pStatus && return before field 1
end uploadProgress
