I have made a simple applescript which chooses a file and uploads it to an ftp site using Cyberduck
It looks like this
set theFile to choose file with prompt "Please select a file to upload:" without invisibles
tell application "Cyberduck"
tell browser 1
upload file theFile
refresh
end tell
end tell
I keep getting this error, however.
“Cyberduck got an error: Can’t make file (alias “sys:Users:pedro:Desktop:papel-a4.jpg”) of browser 1 into type reference.”
Help
Pete O’Connell
Guessing by the error message, you’re trying to coerce an alias to a file; Try upload theFile
.
Hi, thanks for the reply.
When I write it as you suggest I get a new error message.
set theFile to choose file with prompt "Please select a file to upload:" without invisibles
tell application "Cyberduck"
tell browser 1
upload theFile
refresh
end tell
end tell
Gives me this message
“Cyberduck got an error: Some parameter wasn’t understood.”
at the line of my script “upload theFile”
Any more advice is very appreciated
Pete