so you have to check the directory manually I suppose change chdir to web/site/temp/uploads/heywatch ...
tom daociyiyou wrote: > Thanks. > I have changed the wrong codes but got the third error: > ###### > Net::FTPPermError (550 Failed to change directory. ) > ##### > My ftp complete directory is > ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch/ > > On 5月13日, 上午12时29分, Tom Z Meinlschmidt <to...@meinlschmidt.org> wrote: >> back, your code is wrong >> >> ftp = Net::FTP.new(ftp_host) >> ftp.login('username','password') >> ftp.chdir('/www.showreelfinder.com/web/site/temp/uploads/heywatch/') >> ftp.putbinaryfile(thumbnail, encoded_video.title) >> ftp.close >> >> tom >> >> >> >> daociyiyou wrote: >>> Thanks. But i got another error: >>> #### >>> Net::FTPPermError (500 Unknown command. ): >>> #### >>> So i changed the codes according to my guess: >>> #### >>> ftp_host="showreelfinder.com" >>> ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") >>> ftp.login >>> ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ >>> www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) >>> ftp.close >>> #### >>> I still get the error: >>> #### >>> Net::FTPPermError (500 Unknown command. ): >>> #### >>> I want write the binary data(thumbnail) to the ftp address ("ftp:// >>> showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ >>> heywatch/"+encoded_video.title),the encoded_video.title file does not >>> exist on ftp server. >>> so how do i manage? >> -- >> =============================================================================== >> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache >> - experienced RoR/PHP freelancer, available for hire >> >> www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz >> =============================================================================== > -- =============================================================================== Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache - experienced RoR/PHP freelancer, available for hire www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz =============================================================================== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---