<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "CFFILE UPLOAD Accept attribute confused by lists containing comma-space"]]></title>
		<link>http://www.smithproject.org/forum/posts/list/10.page</link>
		<description><![CDATA[Latest messages posted in the topic "CFFILE UPLOAD Accept attribute confused by lists containing comma-space"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>CFFILE UPLOAD Accept attribute confused by lists containing comma-space</title>
				<description><![CDATA[ Consider the following code, which works in CF5:
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>&lt;cffile action="UPLOAD" filefield="something"
    destination="somewhere" nameconflict="MAKEUNIQUE"
    accept="image/gif, image/jpeg, image/png"
    mode="644"&gt;</pre>
		</div>
Under Smith, this will work with image/gif, because it is the first item in the list. However, image/jpeg, etc. will not work because Smith is not really looking for "image/jpeg" but for " image/jpeg" (notice the space) in the content type. Ditto image/png and anything else after that.

Changing accept to "image/gif,image/jpeg,image/png" will fix it, but this is probably not the intended behavior.]]></description>
				<guid isPermaLink="true">http://www.smithproject.org/forum/posts/list/149.page#526</guid>
				<link>http://www.smithproject.org/forum/posts/list/149.page#526</link>
				<pubDate><![CDATA[Sat, 2 Feb 2008 03:27:13]]> GMT</pubDate>
				<author><![CDATA[ Cars2007]]></author>
			</item>
			<item>
				<title>Re:CFFILE UPLOAD Accept attribute confused by lists containing comma-space</title>
				<description><![CDATA[ Cars, thanks for the notice, it will be fixed!

btw. note that recently (after smith-1.3b6 release), the file upload in SVN has been rewritten using apache commons file upload. have you tested this with the latest code from SVN, or with smith-1.3b6 ?

orcus

]]></description>
				<guid isPermaLink="true">http://www.smithproject.org/forum/posts/list/149.page#529</guid>
				<link>http://www.smithproject.org/forum/posts/list/149.page#529</link>
				<pubDate><![CDATA[Sat, 2 Feb 2008 16:35:16]]> GMT</pubDate>
				<author><![CDATA[ orcus]]></author>
			</item>
			<item>
				<title>Re:CFFILE UPLOAD Accept attribute confused by lists containing comma-space</title>
				<description><![CDATA[ Tested, fixed, added to SVN, will be included in the next build.

The problem was that whitespace was not ignored in accept...
In FileTagImpl.upload(), line:

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>    if &#40;SmithList.ListFindNoCase&#40;accept, mime&#41; == 0&#41; {</pre>
		</div>
replaced with:

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>    if &#40;SmithList.ListFindNoCase&#40;accept.replaceAll&#40;"&#91; \t&#93;", ""&#41;, mime&#41; == 0&#41; {</pre>
		</div>

]]></description>
				<guid isPermaLink="true">http://www.smithproject.org/forum/posts/list/149.page#635</guid>
				<link>http://www.smithproject.org/forum/posts/list/149.page#635</link>
				<pubDate><![CDATA[Thu, 6 Mar 2008 14:30:31]]> GMT</pubDate>
				<author><![CDATA[ orcus]]></author>
			</item>
	</channel>
</rss>