I would like to create the functionality to ftp a file from my rails CMS system, does anyone have some insight on FTP functionality/code? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 8/02/2008, at 6:23 AM, agilehack wrote:> > I would like to create the functionality to ftp a file from my rails > CMS system, does anyone have some insight on FTP functionality/code? > >Here we go: require ''net/ftp'' ftp = Net::FTP.new(''example.com'') ftp.login(user = "****", passwd = "****") ftp.putbinaryfile("/data/images/myimage.jpg", File.basename( "/data/ images/myimage.jpg" )) ftp.quit() --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 8/02/2008, at 6:23 AM, agilehack wrote:> > I would like to create the functionality to ftp a file from my rails > CMS system, does anyone have some insight on FTP functionality/code? > >Also you would obviously want to through a rescue in there for ftp errors --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thank you bud On Feb 7, 4:05 pm, Adam Jones <a...-K36Kqf6HJK7JKwlM9GxbOw@public.gmane.org> wrote:> On 8/02/2008, at 6:23 AM, agilehack wrote: > > > > > I would like to create the functionality to ftp a file from my rails > > CMS system, does anyone have some insight on FTP functionality/code? > > Also you would obviously want to through a rescue in there for ftp > errors--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---