Saravanan Krishnan
2008-Feb-07 10:55 UTC
getting StringIO in Mozilla and String in Safari for file up
Hi Folks, When i try to upload files, its working in both Mozilla and IE. But It''s not working in Safari. The reason is,mozilla has StringIO class and safari has string class. My controller codings are based on StringIO. So that its not working in safari(ie its failed to read the file).I cant able to proceed further. Can any one help me. Thanks in Advance Saravanan.K -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Feb-07 12:50 UTC
Re: getting StringIO in Mozilla and String in Safari for file up
On 7 Feb 2008, at 10:55, Saravanan Krishnan wrote:> > > > Hi Folks, > > When i try to upload files, its working in both Mozilla and > IE. But It''s not working in Safari. The reason is,mozilla has > StringIO > class and safari has string class. My controller codings are based on > StringIO. So that its not working in safari(ie its failed to read the > file).I cant able to proceed further. Can any one help me. >The body of a post will be a StringIO, TempFile or (if the form type isn''t multipart) a String. You just need to cope with those possibilities. Are you setting the mime type of the post correctly ? Fred> > Thanks in Advance > Saravanan.K > -- > 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 -~----------~----~----~----~------~----~------~--~---
Saravanan Krishnan
2008-Feb-07 13:37 UTC
Re: getting StringIO in Mozilla and String in Safari for fil
Frederick Cheung wrote:> On 7 Feb 2008, at 10:55, Saravanan Krishnan wrote: > >> file).I cant able to proceed further. Can any one help me. >> > The body of a post will be a StringIO, TempFile or (if the form type > isn''t multipart) a String. > You just need to cope with those possibilities. Are you setting the > mime type of the post correctly ? > > FredThanks for your quick reply Fred. I''m using following form tag <code> <% form_for :taxfile,:url=>{:controller=>''taxpayer'', :action=> ''upload_taxfile''}, :html=>{ :multipart=>true} do%> <%=file_field :taxfile,:uploaded_data,:size=>"15" %> </code> I didn''t set any mime types in config files. Thanks Saravanan -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Feb-07 13:42 UTC
Re: getting StringIO in Mozilla and String in Safari for fil
On 7 Feb 2008, at 13:37, Saravanan Krishnan wrote:> > Frederick Cheung wrote: >> On 7 Feb 2008, at 10:55, Saravanan Krishnan wrote: >> >>> file).I cant able to proceed further. Can any one help me. >>> >> The body of a post will be a StringIO, TempFile or (if the form type >> isn''t multipart) a String. >> You just need to cope with those possibilities. Are you setting the >> mime type of the post correctly ? >> >> Fred > > > Thanks for your quick reply Fred. > > I''m using following form tag > > <code> > <% form_for :taxfile,:url=>{:controller=>''taxpayer'', :action=> > ''upload_taxfile''}, :html=>{ :multipart=>true} do%> > <%=file_field :taxfile,:uploaded_data,:size=>"15" %> > </code>Setting :multipart => true is all you should need to do. I think you''ll just have to deal with whatever rails throws at you. Fred> > > I didn''t set any mime types in config files. > > Thanks > Saravanan > > -- > 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 -~----------~----~----~----~------~----~------~--~---