Hi people, I''ve tried many ways to upload files in rails 2.0. None of them with success. I want to do it the simplest way. Any suggestions? Any tutorial on the web? Best regards, -- Bruno Guimarães Sousa Ciência da Computação UFBA Registered Linux user #465914 --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
have you looked at paperclip? I hear it''s pretty simple -- 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 -~----------~----~----~----~------~----~------~--~---
Thanks! On Mon, Apr 21, 2008 at 11:27 AM, Mike Nicholaides < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > have you looked at paperclip? I hear it''s pretty simple > -- > Posted via http://www.ruby-forum.com/. > > > >-- Bruno Guimarães Sousa Ciência da Computação UFBA Registered Linux user #465914 --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
hi im anas i''ll explain how to upload files to ur app require ''fileutils'' require ''digest/sha2'' class User < ActiveRecord::Base def self.register_user(register) image_of = register[''photo_url''].original_filename binary_data=register[''photo_url''].read(reading binary data) new_user = User.new new_user.name = register[''first_name'']+'' ''+register[''last_name''] new_user.email = register[''email_id''] new_user.password = Digest::SHA256.hexdigest(register[''user_pwd'']) new_user.photo_url = register[''photo_url''].original_filename (storing in db only file name) new_user.user_type=1 new_user.save File.open("public/profileImages/#{image_of}", "wb") { |f| f.write(binary_data)} ("this will store ur file in /public/profileimages/"with filename") end i hope it''ll clarify ur doubts................ it''s benn sucessfully working...... thanq mohd anas Attachments: http://www.ruby-forum.com/attachment/1776/user.rb -- 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 -~----------~----~----~----~------~----~------~--~---
hi i have used country_select in my form to let the user choose her/his country now the only problem is that i have to convert these english names to Farsi because the whole site is in Farsi. does any one know how can i do that? thank you ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---