On Nov 8, 2:47 pm, Guo Yangguang <[email protected]>
wrote:
> thanks,Fred.
> But i get the ftppermerror when using storbinary and StringIO.
are you sure the specified user can upload files
> ########
> 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)
Looks like you are missing a space after STOR, you should probably
also make the chdir and absolute path.
Fred
>
> 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 viahttp://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---