Jan Schenkel janschenkel at yahoo.com
Wed Dec 28 13:41:50 EST 2005

--- Marty Knapp <martyknapp at comcast.net> wrote:
> I'm trying to to build a simple app so that my boys
> can send me 
> Quicktime movies that are too big to email. I put
> togther a stack with a 
> button set for drag and drop with the following
> script:
> on dragdrop
>   put empty into fld "LogData"
>   get the dragdata
>   if it is not empty then
>     libURLftpUploadFile 
> it,"ftp://username:password@ftp.mydomain.com/drop/"
> --"drop" is a 
> directory that I've created and can access
>     libUrlSetLogField the long id of fld "LogData"
>   else beep
> end dragdrop
> the file is not uploaded and I get this message:
> 220 ProFTPD 1.3.0rc2 Server (Main FTP Server)
> []
> 331 Password required for username.
> 230 User username logged in.
> 257 "/" is current directory.
> 221 Goodbye.
> What am I doing wrong?
> Marty Knapp

Hi Marty,

It could be that you have to supply a filename and not
a directory in the uploadURL parameter.
I'd modify your handler to something like and see if
that works:
on dragdrop
  put empty into fld "LogData"
  --> you should only have to set the log field once
  libUrlSetLogField the long id of fld "LogData"
  put the dragdata into tFilePath
  if tFilePath is not empty then
    set the itemDelimiter to "/"
    put item -1 of tFilePath into tFileName
"ftp://username:password@ftp.mydomain.com/drop/" & \
        tFileName into tUploadURL
    libURLftpUploadFile tFilePath, tUploadURL
  else beep
end dragdrop

Hope this helped,

Jan Schenkel.

Quartam Reports for Revolution

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

Yahoo! for Good - Make a difference this year. 

More information about the Use-livecode mailing list