<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rails on the Run &#187; mime type\&#8217;</title>
	<atom:link href="http://railsontherun.com/tag/mime-type/feed/" rel="self" type="application/rss+xml" />
	<link>http://railsontherun.com</link>
	<description>Rails experiments by Matt Aimonetti</description>
	<lastBuildDate>Tue, 23 Feb 2010 07:28:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>mimetype_fu update</title>
		<link>http://railsontherun.com/2007/06/22/mimetype_fu-update/</link>
		<comments>http://railsontherun.com/2007/06/22/mimetype_fu-update/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 06:07:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mime type\']]></category>
		<category><![CDATA[mimetype_fu]]></category>
		<category><![CDATA[ninja]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2007/06/22/mimetype_fu-update</guid>
		<description><![CDATA[Quick note to let you know that I updated mimetype_fu to actually get the mime type of a file using the file command on mac and linux. I still didn&#8217;t post an example since I&#8217;m planning on writing a patch for attachment_fu.
]]></description>
			<content:encoded><![CDATA[<p>Quick note to let you know that I updated mimetype_fu to actually get the mime type of a file using the file command on mac and linux. I still didn&#8217;t post an example since I&#8217;m planning on writing a patch for attachment_fu.</p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2007/06/22/mimetype_fu-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new rails plugin: mimetype_fu</title>
		<link>http://railsontherun.com/2007/06/14/new-rails-plugin-mimetype_fu/</link>
		<comments>http://railsontherun.com/2007/06/14/new-rails-plugin-mimetype_fu/#comments</comments>
		<pubDate>Thu, 14 Jun 2007 04:45:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[attachment_fu]]></category>
		<category><![CDATA[content type]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[mime]]></category>
		<category><![CDATA[mime type\']]></category>
		<category><![CDATA[mimetype_fu]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2007/06/14/new-rails-plugin-mimetype_fu</guid>
		<description><![CDATA[mimetype_fu/ is a new plugin I just wrote. It&#8217;s simple and it can be really useful if you need to get the mime type of a file already on your server.
During one of my project, I add to migrate old assets from a legacy system to a new Rails app. The new app uses attachment [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/mimetype-fu/">mimetype_fu/</a> is a new plugin I just wrote. It&#8217;s simple and it can be really useful if you need to get the mime type of a file already on your server.</p>
<p>During one of my project, I add to migrate old assets from a legacy system to a new Rails app. The new app uses <a href="http://svn.techno-weenie.net/projects/plugins/attachment_fu/">attachment fu</a> and even though techno weenie did an amazing job, attachment<em>fu validation is based on the content type. A</em>fu gets the content type coming from the CGI query. </p>
<p>Unit test has a helper faking this process but in real life, if you use a Flash uploader (Flash doesn&#8217;t give you the proper mime type/content type) or if you want to migrate files, the attachment_fu validation won&#8217;t work for you.</p>
<p>The solution is simple: <a href="http://code.google.com/p/mimetype-fu/">mimetype_fu/</a></p>
<p><a href="http://code.google.com/p/mimetype-fu/">mimetype_fu/</a> extends the File class and is really easy to use:</p>
<pre><code>File.mime_type?(@file)
</code></pre>
<p>Check it out <a href="http://code.google.com/p/mimetype-fu/">http://code.google.com/p/mimetype-fu/</a></p>
<p>Expect a post showing how a ninja would use the mimetype<em>fu / attachment</em>fu combo <img src='http://railsontherun.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2007/06/14/new-rails-plugin-mimetype_fu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

