FTP

Jan Schenkel janschenkel at yahoo.com
Wed Dec 28 12:41:50 CST 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)
> [64.40.144.138]
> 331 Password required for username.
> 230 User username logged in.
> 257 "/" is current directory.
> 221 Goodbye.
> CLOSED
> 
> 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
    put
"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
<http://www.quartam.com>

=====
"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. 
http://brand.yahoo.com/cybergivingweek2005/



More information about the use-livecode mailing list