Hi guys is there anyone who knows how to upload files? can u give me the required codings? Thx Regards Kushan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> is there anyone who knows how to upload files? > can u give me the required codings?http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
i already followed wht that page says, but it wont work can anyone give me codings im sure some one may have done file uploading Regards Kushan On 3/21/07, glenn <glenn.gillen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > is there anyone who knows how to upload files? > > can u give me the required codings? > > http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> i already followed wht that page says, but it wont work > can anyone give me codings > im sure some one may have done file uploadingSomeone has, and they posted the code on the wiki. If it''s not working then it would be more helpful to know what error you are getting. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
this is the error i got undefined method ''read'' for "c:\\modernchef.txt":String this is the model that i wrote def self.save(metro_upload) File.open("Metro_SQL/#{metro_upload[''name'']}/metro.sql", "w") { |f| $readedFile = f.read(metro_upload[''sql_file''].read) f.write($readedFile) } end end <http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles> On 3/21/07, glenn <glenn.gillen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > i already followed wht that page says, but it wont work > > can anyone give me codings > > im sure some one may have done file uploading > > Someone has, and they posted the code on the wiki. If it''s not working > then it would be more helpful to know what error you are getting. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
check out railsgrunt.com to upload multiple files. Kushan Jayathilake wrote:> Hi guys > > is there anyone who knows how to upload files? > can u give me the required codings? > > Thx > Regards > Kushan-- 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 -~----------~----~----~----~------~----~------~--~---
Check out the acts_as_attachment plugin it works great. Here is a tutorial for it from the author of the plugin http://weblog.techno-weenie.net/articles/acts_as_attachment On Mar 21, 6:56 am, mixplate <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> check out railsgrunt.com to upload multiple files. > > Kushan Jayathilake wrote: > > Hi guys > > > is there anyone who knows how to upload files? > > can u give me the required codings? > > > Thx > > Regards > > Kushan > > -- > 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 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 -~----------~----~----~----~------~----~------~--~---
Your bug is probably in this line:> $readedFile = f.read(metro_upload[''sql_file''].read)Since that''s the only one with calls to a method named ''read'' (note the error message). And since f.read is definitely a valid method call, the second one would seem the likely culprit. Why are you calling metro_upload[''sql_file''].read? Isn''t the value of metro_upload[''sql_file''] "c:\\modernchef.txt"? On 3/21/07, Kushan Jayathilake <kushan.rails-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> this is the error i got > > undefined method ''read'' for "c:\\modernchef.txt":String > > this is the model that i wrote > > def self.save(metro_upload) > > File.open("Metro_SQL/#{metro_upload[''name'']}/metro.sql", > "w") { > > |f| > > $readedFile = f.read(metro_upload[''sql_file''].read) > > f.write($readedFile) > } > > > end > > end > > > > On 3/21/07, glenn <glenn.gillen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > i already followed wht that page says, but it wont work > > > can anyone give me codings > > > im sure some one may have done file uploading > > > > Someone has, and they posted the code on the wiki. If it''s not working > > then it would be more helpful to know what error you are getting.-- Colin Strasser Union Square Internet Development 917.723.6930 (m) 646.219.0332 (f) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Kushan Jayathilake wrote:> this is the error i got > > undefined method ''read'' for "c:\\modernchef.txt":String >have you enctype="multipart/form-data" among your form attributes? -- 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 -~----------~----~----~----~------~----~------~--~---
And give permission, 0777 -- 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, You can use ''file_column'' to control file/image uploadings Cheers, Robert On Mar 22, 9:37 am, Jamal Soueidan <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> And give permission, 0777 > > -- > 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 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 -~----------~----~----~----~------~----~------~--~---