<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: How To Gracefully Recover From File Upload Errors In Grails</title>
	<atom:link href="http://brainflush.wordpress.com/2008/12/04/how-to-gracefully-recover-from-file-upload-errors-in-grails/feed/" rel="self" type="application/rss+xml" />
	<link>http://brainflush.wordpress.com/2008/12/04/how-to-gracefully-recover-from-file-upload-errors-in-grails/</link>
	<description>Tech And Talk - by Matthias Käppler</description>
	<lastBuildDate>Thu, 17 Dec 2009 09:41:00 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jim Kuo</title>
		<link>http://brainflush.wordpress.com/2008/12/04/how-to-gracefully-recover-from-file-upload-errors-in-grails/#comment-612</link>
		<dc:creator>Jim Kuo</dc:creator>
		<pubDate>Sat, 11 Jul 2009 18:08:02 +0000</pubDate>
		<guid isPermaLink="false">http://brainflush.wordpress.com/?p=41#comment-612</guid>
		<description>Thanks for this blog, I ran into exactly the same problem and your solution works perfectly :-)

Also Luis&#039; enhancement was important too, otherwise the controller would have missed the request parameters like Luis mentioned. 

For those of you who have moved to grails 1.1.1, the DSL definition for the spring bean looks like (in resource.groovy)

beans = {
  multipartResolver(com.example.CustomMultipartResolver) {
    maxUploadSize = 1048576
  }
}</description>
		<content:encoded><![CDATA[<p>Thanks for this blog, I ran into exactly the same problem and your solution works perfectly :-)</p>
<p>Also Luis&#8217; enhancement was important too, otherwise the controller would have missed the request parameters like Luis mentioned. </p>
<p>For those of you who have moved to grails 1.1.1, the DSL definition for the spring bean looks like (in resource.groovy)</p>
<p>beans = {<br />
  multipartResolver(com.example.CustomMultipartResolver) {<br />
    maxUploadSize = 1048576<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis Arias</title>
		<link>http://brainflush.wordpress.com/2008/12/04/how-to-gracefully-recover-from-file-upload-errors-in-grails/#comment-570</link>
		<dc:creator>Luis Arias</dc:creator>
		<pubDate>Wed, 18 Feb 2009 12:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://brainflush.wordpress.com/?p=41#comment-570</guid>
		<description>Wow, thanks for this post !  I extended your solution because I wanted for the controller to still receive request parameters, at least non file ones.  It&#039;s a dirty hack because commons-fileupload doesn&#039;t provide the right extension points for doing this cleanly but it works quite well.  I replace line 11 of your CustomMultipartResolver with the following lines:

String encoding = determineEncoding(request);
FileUpload fileUpload = newFileUpload(getFileItemFactory())
fileUpload.setHeaderEncoding(encoding)
def fileItems = ((ServletFileUpload)fileUpload).parseRequest(request);
def parsingResult = parseFileItems(fileItems, encoding)
return new DefaultMultipartHttpServletRequest(request, [:], parsingResult.multipartParameters)

Luis</description>
		<content:encoded><![CDATA[<p>Wow, thanks for this post !  I extended your solution because I wanted for the controller to still receive request parameters, at least non file ones.  It&#8217;s a dirty hack because commons-fileupload doesn&#8217;t provide the right extension points for doing this cleanly but it works quite well.  I replace line 11 of your CustomMultipartResolver with the following lines:</p>
<p>String encoding = determineEncoding(request);<br />
FileUpload fileUpload = newFileUpload(getFileItemFactory())<br />
fileUpload.setHeaderEncoding(encoding)<br />
def fileItems = ((ServletFileUpload)fileUpload).parseRequest(request);<br />
def parsingResult = parseFileItems(fileItems, encoding)<br />
return new DefaultMultipartHttpServletRequest(request, [:], parsingResult.multipartParameters)</p>
<p>Luis</p>
]]></content:encoded>
	</item>
</channel>
</rss>
