<?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/"
		>
<channel>
	<title>Comments on: AJAX file upload progress for Java using commons fileupload and prototype</title>
	<atom:link href="http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/</link>
	<description>Thoughts on Software Development and Engineering</description>
	<lastBuildDate>Thu, 05 Jan 2012 16:35:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Driss</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-160035</link>
		<dc:creator>Driss</dc:creator>
		<pubDate>Fri, 01 Jan 2010 21:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-160035</guid>
		<description>It&#039;s still accurate, efficient (very fast) and it gives more control on the flow than [&lt;code&gt;ProgressListener&lt;/code&gt;] provided by the &lt;code&gt;commons-fileupload&lt;/code&gt; ;
    many thanks for sharing Carson +++

It can handle also multiple files uploaded at once
   (but the better is to generate dynamically new forms in the Javascript side as needed and handling the upload in Threads)

I simply handled some javascript cases :
-/ In  [UploadServlet.java],  escaping character &quot;&#039;&quot; within the server&#039;s message returned by sendCompleteResponse() :
    &lt;code&gt;window.parent.killUpdate(&#039;&quot; + message.replace(&quot;&#039;&quot;, &quot;\\&#039;&quot;) + &quot;&#039;);&lt;/code&gt;

In the client side, testing [updater] before stop it in [function killUpdate(message) :
	&lt;code&gt;if(updater != null){
                    updater.stop();
          }&lt;/code&gt;


All the best !</description>
		<content:encoded><![CDATA[<p>It&#039;s still accurate, efficient (very fast) and it gives more control on the flow than [
<div class="codesnip-container" >ProgressListener</div>
<p>] provided by the
<div class="codesnip-container" >commons-fileupload</div>
<p> ;<br />
    many thanks for sharing Carson +++</p>
<p>It can handle also multiple files uploaded at once<br />
   (but the better is to generate dynamically new forms in the Javascript side as needed and handling the upload in Threads)</p>
<p>I simply handled some javascript cases :<br />
-/ In  [UploadServlet.java],  escaping character &#034;&#039;&#034; within the server&#039;s message returned by sendCompleteResponse() :</p>
<div class="codesnip-container" >window.parent.killUpdate(&#039;&#034; + message.replace(&#034;&#039;&#034;, &#034;\&#039;&#034;) + &#034;&#039;);</div>
<p>In the client side, testing [updater] before stop it in [function killUpdate(message) :</p>
<div class="codesnip-container" >if(updater != null){<br />
                    updater.stop();<br />
          }</div>
<p>All the best !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Debabrata Biswas</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-158612</link>
		<dc:creator>Debabrata Biswas</dc:creator>
		<pubDate>Tue, 08 Dec 2009 11:02:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-158612</guid>
		<description>I used your source code,it runs in local computer fine,showing percentage bar.But when i put this code in live server.it wont run mean progress bar not showing…I add every things whatever i used in local computer.Showing UploadMonotor not defined.I add DWR jar2.5,DWR.XML that create UploadMonitor.js.And import classes that contains UploadMonitor class.Please If you can look around for this your help is much appreciated and very needful to me.</description>
		<content:encoded><![CDATA[<p>I used your source code,it runs in local computer fine,showing percentage bar.But when i put this code in live server.it wont run mean progress bar not showing…I add every things whatever i used in local computer.Showing UploadMonotor not defined.I add DWR jar2.5,DWR.XML that create UploadMonitor.js.And import classes that contains UploadMonitor class.Please If you can look around for this your help is much appreciated and very needful to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sonia Pandit</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-158046</link>
		<dc:creator>Sonia Pandit</dc:creator>
		<pubDate>Tue, 01 Dec 2009 18:59:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-158046</guid>
		<description>It works nicely, but I have a lot of red markups in eclipse for the prototype.js file.
Sorry I don&#039;t have too much experience in javascript.  I also need to upload multiple files.  How do I modify it for multiple file upload and where are the files being uploaded to?  

Thanks,

Sonia</description>
		<content:encoded><![CDATA[<p>It works nicely, but I have a lot of red markups in eclipse for the prototype.js file.<br />
Sorry I don&#039;t have too much experience in javascript.  I also need to upload multiple files.  How do I modify it for multiple file upload and where are the files being uploaded to?  </p>
<p>Thanks,</p>
<p>Sonia</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tmax</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-146101</link>
		<dc:creator>tmax</dc:creator>
		<pubDate>Tue, 11 Aug 2009 12:22:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-146101</guid>
		<description>Hi Carson,

Nice example you have provided in source code.

I have came across a problem in your source code.

When file upload completes and response comes to the html page, it is not able to call the javascript function &quot;killUpdate&quot;. That results in the non stop update cycle.

I have tried with eval() but no success. If you can look around for this your help is much appreciated.

thanks</description>
		<content:encoded><![CDATA[<p>Hi Carson,</p>
<p>Nice example you have provided in source code.</p>
<p>I have came across a problem in your source code.</p>
<p>When file upload completes and response comes to the html page, it is not able to call the javascript function &#034;killUpdate&#034;. That results in the non stop update cycle.</p>
<p>I have tried with eval() but no success. If you can look around for this your help is much appreciated.</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-66879</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 06 May 2008 15:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-66879</guid>
		<description>One issue I ran into with this code was adding non-file form fields along with the file field.  For example, I added a description field before my file upload field.  This caused the bytes read to be set to the total size as soon as the file upload began. Then my progress bar would go to 200%.  Here is my fix, I&#039;m open to better solutions if any.

Inside MonitoredDiskFileItem.java:


public OutputStream getOutputStream() throws IOException {
    if( mos == null ) {
        // Create a new MonitoredOutputStream.
        this.mos = new MonitoredOutputStream(super.getOutputStream(), listener);

        // Reset the bytes of the file upload listener.
        ( (FileUploadListener ) listener ).getFileUploadStats().setBytesRead(0);    
    }

    return this.mos;
}</description>
		<content:encoded><![CDATA[<p>One issue I ran into with this code was adding non-file form fields along with the file field.  For example, I added a description field before my file upload field.  This caused the bytes read to be set to the total size as soon as the file upload began. Then my progress bar would go to 200%.  Here is my fix, I&#039;m open to better solutions if any.</p>
<p>Inside MonitoredDiskFileItem.java:</p>
<p>public OutputStream getOutputStream() throws IOException {<br />
    if( mos == null ) {<br />
        // Create a new MonitoredOutputStream.<br />
        this.mos = new MonitoredOutputStream(super.getOutputStream(), listener);</p>
<p>        // Reset the bytes of the file upload listener.<br />
        ( (FileUploadListener ) listener ).getFileUploadStats().setBytesRead(0);<br />
    }</p>
<p>    return this.mos;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-28791</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 13 Sep 2007 18:58:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-28791</guid>
		<description>Very nice.  Took me a moment to figure out that the sample code is NOT what you were going over in the text of the article.</description>
		<content:encoded><![CDATA[<p>Very nice.  Took me a moment to figure out that the sample code is NOT what you were going over in the text of the article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ss</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-28383</link>
		<dc:creator>ss</dc:creator>
		<pubDate>Sat, 08 Sep 2007 06:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-28383</guid>
		<description>I think i will use dojo insted of prototype.</description>
		<content:encoded><![CDATA[<p>I think i will use dojo insted of prototype.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ss</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-28381</link>
		<dc:creator>ss</dc:creator>
		<pubDate>Sat, 08 Sep 2007 06:52:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-28381</guid>
		<description>Excellent
This is what I was looking for.</description>
		<content:encoded><![CDATA[<p>Excellent<br />
This is what I was looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen More</title>
		<link>http://www.ioncannon.net/programming/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/comment-page-1/#comment-4457</link>
		<dc:creator>Stephen More</dc:creator>
		<pubDate>Wed, 28 Feb 2007 18:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/38/ajax-file-upload-progress-for-java-using-commons-fileupload-and-prototype/#comment-4457</guid>
		<description>commons-fileupload version 1.2 now has support for progress listeners: 
upload.setProgressListener(progressListener);

It also supports Streaming so the upload can go straight into a database.

Perhaps you can provide a new example...the code has been simplified.</description>
		<content:encoded><![CDATA[<p>commons-fileupload version 1.2 now has support for progress listeners:<br />
upload.setProgressListener(progressListener);</p>
<p>It also supports Streaming so the upload can go straight into a database.</p>
<p>Perhaps you can provide a new example&#8230;the code has been simplified.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.126 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-01-10 19:57:29 -->

