I''m using a Rake task to add local files into a database designed for use with attachment_fu. http://eldorado.googlecode.com/svn/trunk/db/migrate/039_create_avatars.rb http://eldorado.googlecode.com/svn/trunk/lib/tasks/import_files.rake So, attachment_fu has a "content_type" field, which apparently is receiving that information from the browser...? I''m trying to figure out if there is a way to get the content_type of a file (e.g. ''image/png'') that you''ve already got in your file-system. I can''t find anything about this in the Pickaxe, or by looking at the attachment_fu plugin. Any help very much appreciated! -- 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 -~----------~----~----~----~------~----~------~--~---
read the following post: http://www.railsweenie.com/users/2237/posts contains information about using the mime-types plugin to determine content_type outside of the CGI library Mike On 7/4/07, Trevor Turk <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m using a Rake task to add local files into a database designed for > use with attachment_fu. > > http://eldorado.googlecode.com/svn/trunk/db/migrate/039_create_avatars.rb > http://eldorado.googlecode.com/svn/trunk/lib/tasks/import_files.rake > > So, attachment_fu has a "content_type" field, which apparently is > receiving that information from the browser...? > > I''m trying to figure out if there is a way to get the content_type of a > file (e.g. ''image/png'') that you''ve already got in your file-system. I > can''t find anything about this in the Pickaxe, or by looking at the > attachment_fu plugin. > > Any help very much appreciated! > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Terrific. Thanks very much! -- 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 -~----------~----~----~----~------~----~------~--~---