Michael Cramp
2008-Jan-19 00:37 UTC
attachment_fu and really small files (and an extension?)
whats up guys..ive tried sifting through the archives of this forum but to no avail..i am using rick olson''s attachment_fu (great stuff btw) but i run into problems when I have a really small file (like 20kb) and I go to upload it. For example, I upload a file called unrealircd.conf and i get the error, "undefined method ''content_type''" and I see that the object is a string and not a file..even so, whenever i get rid of the extension (.conf) of the file, it uploads just fine. any ideas? -- 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 -~----------~----~----~----~------~----~------~--~---
Michael Cramp
2008-Jan-19 00:45 UTC
Re: attachment_fu and really small files (and an extension?)
Michael Cramp wrote:> whats up guys..ive tried sifting through the archives of this forum but > to no avail..i am using rick olson''s attachment_fu (great stuff btw) but > i run into problems when I have a really small file (like 20kb) and I go > to upload it. For example, I upload a file called unrealircd.conf and i > get the error, > > "undefined method ''content_type''" and I see that the object is a string > and not a file..even so, whenever i get rid of the extension (.conf) of > the file, it uploads just fine. any ideas?actually, i checked out my logs again..seems like that error is gone (seems to pop up randomly) but i am getting this when uploading a .torrent file: ActiveRecord::RecordInvalid (Validation failed: Content type can''t be blank, Size is not included in the list, Size can''t be blank, Filename can''t be blank): -- 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 -~----------~----~----~----~------~----~------~--~---
Jimmy Palmer
2008-Jan-19 04:40 UTC
Re: attachment_fu and really small files (and an extension?)
I''ve had similar issues. Check your max size - sometimes it is just because the size of the file is too large. -- 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 -~----------~----~----~----~------~----~------~--~---
Ryan Eno
2008-Jan-24 19:52 UTC
Re: attachment_fu and really small files (and an extension?)
Jimmy Palmer wrote:> I''ve had similar issues. Check your max size - sometimes it is just > because the size of the file is too large.I have this same error: Validation failed: Size is not included in the list I am trying to uplaod a 12.5k animated .gif file, and my max_size is set to 100.kilobytes. So the file being too big is definately not the issue. -- 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 -~----------~----~----~----~------~----~------~--~---