Hi, folks, I have a "data" field that is defined as "blob" in model file. However, it always fails when I try to save a larger file ... in this case, the so-called larger is merely 200K around. Do I need to do anything special to be able to save it (the file can be text or binary). Mysql::Error: #22001Data too long for column ''data'' at row 1: INSERT INTO works (`name`, `tag_id`, `data`, `email`) VALUES(''test102'', 0, x''255044462d..... Thanks Oliver --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 2006-09-20, at 14:03 , Oliver wrote:> I have a "data" field that is defined as "blob" in model file. > However, > it always fails when I try to save a larger file ... in this case, the > so-called larger is merely 200K around. Do I need to do anything > special to be able to save it (the file can be text or binary).Blobs are way too much trouble to deal with. Any reason why you can''t store the blobby data in an external file? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hmm ... I suppose it can be external file, since I am new to rails. I just thought with ActiveRecord in the middle, I could deal with all fields in a uniform way. Is storing external file a more recommended practice? then the directory layout and naming become an issue to deal with when you have many files. Any pointer on how is it supposed to be done? Thanks for the reply. Oliver --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 2006-09-20, at 14:29 , Oliver wrote:> Is storing external file a more recommended practice? then the > directory layout and naming become an issue to deal with when you have > many files. Any pointer on how is it supposed to be done?There''s a plugin called file_column. Sorry I can''t give you more details, I have no experience with it, for I''ve been using my own solution since before file_column was around. (and my own solution is not ready for public consumption, otherwise I''d gladly recommend it) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---