> How do I determine the content type of the uploaded image? I have seen
> that the default content-type is "application/octet-stream". What
if I
> wanted to upload a gif, bmp, jpg or other format. How will I determine
> which format is uploaded?
http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles
A ways down that page it says that the following will give you the content
type (assuming a form with: <%= file_field "person",
"picture" %>):
person[''picture''].content_type
-philip
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---