Can't Get libURLftpUploadFile to Work
Roger Eller
roger.e.eller at sealedair.com
Sun Sep 25 16:35:27 EDT 2011
On Sun, Sep 25, 2011 at 4:09 PM, Gregory Lypny wrote:
> Hello everyone,
>
> Took my first stab at using libURLftpUploadFile
>
> My URL is of the form
>
> theURL = ftp://server Path//Documents/This Folder/That Folder/And
> Now Here
>
> and the file
>
> myFile = /Users/gregory/Desktop/My Assignment.csv
>
> I use the standard answer dialog to prompt for file selection, but when the
> script is run, nothing is transferred to the server.
>
> on mouseUp
> answer file "Choose the file"
> if it is not empty
> then
> put it into myFile
> libURLftpUploadFile myFile,theURL
> end if
> end mouseUp
>
>
> I know that the address is correct because I can upload data to the server
> using
>
> put URL (“ftp://“ & etc.)
>
> What am I doing wrong?
>
> Regards,
>
> Gregory
Hi Gregory. This is the form I typically use for FTP uploading:
on mouseUp
set the itemDel to "/"
answer file "Choose the file"
if it is not empty then
put it into myFile
put item -1 of myFile into tFileName
-- change user:pass below to your credentials on FTP server
put URL ("binfile:" & myFile) into URL ("
ftp://user:pass@server.com/path/" & tFileName)
end if
end mouseUp
˜Roger
More information about the use-livecode
mailing list