[Rails] Re: how to write an binary file to ftp
thanks,Fred.
But i get the ftppermerror when using storbinary and StringIO.
########
Net::FTP.open('showreelfinder.com') do |ftp|
ftp.passive=true
ftp.login(name,password)
ftp.chdir('www.showreelfinder.com/web/site/temp/uploads/heywatch
/thumbnails')
thumbnail_file=StringIO.new(thumbnail)
ftp.storbinary("STOR"+"#{thumb_title}",thumbnail_file,1024)
end
###########
The thumbnail is binary file,so can i use the stringio?
can you tell me the details? I can not find an good example in ruby
document.
Thank you very much!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home