thanq for suggestions........... but im using fileutils and im giving user to upload only one image............ so for that im using filutils in app..i wrote the code as #File.open("/public/images/#{self.id}","wb") # { |f| f.write(params(register[''photo-url'']).read) } this code is writing the file to public folder but it''s content is not reading.......... it''s showing 0bytes in that image... plzzzz help me very very urgent md anas -- 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-/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 20 Apr 2008, at 11:08, Anas Ali wrote:> > thanq for suggestions........... > but im using fileutils and im giving user to upload only one > image............ > so for that im using filutils > > in app..i wrote the code as > > #File.open("/public/images/#{self.id}","wb") > # { |f| f.write(params(register[''photo-url'']).read) } >Well I don''t know what your the name of your form parameters are, but that looks very wrong. It''s more likely to be something like params[...] Fred> this code is writing the file to public folder but > it''s content is not reading.......... > it''s showing 0bytes in that image... > plzzzz help me very very urgent > md anas > -- > 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-/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 -~----------~----~----~----~------~----~------~--~---
Anas Ali wrote:> thanq for suggestions........... > but im using fileutils and im giving user to upload only one > image............ > so for that im using filutils > > in app..i wrote the code as > > #File.open("/public/images/#{self.id}","wb") > # { |f| f.write(register[''photo-url'']).read) } >"register[''photo-url'']" is the parameter taken from the form(i.e. view) this code is writing the file to public folder but> it''s content is not reading.......... > it''s showing 0bytes in that image... > plzzzz help me very very urgent > md anas-- 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-/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 -~----------~----~----~----~------~----~------~--~---