<?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: multiple file uploads using HTML5</title>
	<atom:link href="http://verens.com/2009/12/28/multiple-file-uploads-using-html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/</link>
	<description>klog - Kae&#039;s Log</description>
	<lastBuildDate>Fri, 10 Feb 2012 21:49:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Kae Verens</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-3316</link>
		<dc:creator>Kae Verens</dc:creator>
		<pubDate>Sun, 06 Nov 2011 10:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-3316</guid>
		<description>for the last two posters; i wrote this article because I was doing a HTML5 multiple file upload for KFM (a file manager), so that&#039;s why &quot;kfm&quot; is in the input. Of course, you could do this whatever way you want.

The point of the article was to illustrate how to convert PHP&#039;s file upload array into something useful.

Pat, do it whatever way you want!

pepkin88&#039;s foreach example in the comments above is more efficient and easier to read than what I did in the post.</description>
		<content:encoded><![CDATA[<p>for the last two posters; i wrote this article because I was doing a HTML5 multiple file upload for KFM (a file manager), so that&#8217;s why &#8220;kfm&#8221; is in the input. Of course, you could do this whatever way you want.</p>
<p>The point of the article was to illustrate how to convert PHP&#8217;s file upload array into something useful.</p>
<p>Pat, do it whatever way you want!</p>
<p>pepkin88&#8242;s foreach example in the comments above is more efficient and easier to read than what I did in the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kae Verens</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-3315</link>
		<dc:creator>Kae Verens</dc:creator>
		<pubDate>Sun, 06 Nov 2011 10:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-3315</guid>
		<description>ah! I misunderstood the original &quot;why can&#039;t you use foreach()&quot; as being about the original array.

yes, good point. in fact, I&#039;ve no idea why I used for() - maybe I was tired when I wrote it ;-)</description>
		<content:encoded><![CDATA[<p>ah! I misunderstood the original &#8220;why can&#8217;t you use foreach()&#8221; as being about the original array.</p>
<p>yes, good point. in fact, I&#8217;ve no idea why I used for() &#8211; maybe I was tired when I wrote it <img src='http://verens.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-3314</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Sun, 06 Nov 2011 05:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-3314</guid>
		<description>can just do whatever I want for the files in the first &#039;for&#039; and save the &#039;foreach&#039;?</description>
		<content:encoded><![CDATA[<p>can just do whatever I want for the files in the first &#8216;for&#8217; and save the &#8216;foreach&#8217;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pepkin88</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-3313</link>
		<dc:creator>pepkin88</dc:creator>
		<pubDate>Sat, 05 Nov 2011 20:57:41 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-3313</guid>
		<description>I must ask: why is this so complicated? I&#039;m missing a point, why do you put name for input &quot;kfm_file&quot; (without brackets) in the first place. Whether the &quot;multiple&quot; argument is supported or not, you only operate on array, which make the code so much simpler, either JavaScript or PHP. Also you could use foreach loop as stated above.

Unless I missed some use cases in which those steps are required, then it could make sense.

Cheers.</description>
		<content:encoded><![CDATA[<p>I must ask: why is this so complicated? I&#8217;m missing a point, why do you put name for input &#8220;kfm_file&#8221; (without brackets) in the first place. Whether the &#8220;multiple&#8221; argument is supported or not, you only operate on array, which make the code so much simpler, either JavaScript or PHP. Also you could use foreach loop as stated above.</p>
<p>Unless I missed some use cases in which those steps are required, then it could make sense.</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pepkin88</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-3312</link>
		<dc:creator>pepkin88</dc:creator>
		<pubDate>Sat, 05 Nov 2011 20:22:15 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-3312</guid>
		<description>Sorry, wrong :oops:

&lt;code&gt;foreach ($fdata[&#039;name&#039;] as $i =&gt; $d) {
 $files[] = array(
  &#039;name&#039; =&gt; $d,
  &#039;tmp_name&#039; =&gt; $fdata[&#039;tmp_name&#039;][$i]
 );
}&lt;/code&gt;

That&#039;s better.</description>
		<content:encoded><![CDATA[<p>Sorry, wrong <img src='http://verens.com/wp-includes/images/smilies/icon_redface.gif' alt=':oops:' class='wp-smiley' /> </p>
<p><code>foreach ($fdata['name'] as $i =&gt; $d) {<br />
 $files[] = array(<br />
  'name' =&gt; $d,<br />
  'tmp_name' =&gt; $fdata['tmp_name'][$i]<br />
 );<br />
}</code></p>
<p>That&#8217;s better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pepkin88</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-3311</link>
		<dc:creator>pepkin88</dc:creator>
		<pubDate>Sat, 05 Nov 2011 20:19:34 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-3311</guid>
		<description>Still, why not?
&lt;code&gt;foreach ($fdata as $i =&gt; $d) {
  $files[] = array(
    &#039;name&#039; =&gt; $d,
    &#039;tmp_name&#039; =&gt; $fdata[&#039;tmp_name&#039;][$i] // nasty comma
  );
}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Still, why not?<br />
<code>foreach ($fdata as $i =&gt; $d) {<br />
  $files[] = array(<br />
    'name' =&gt; $d,<br />
    'tmp_name' =&gt; $fdata['tmp_name'][$i] // nasty comma<br />
  );<br />
}</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kae Verens</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-3244</link>
		<dc:creator>Kae Verens</dc:creator>
		<pubDate>Thu, 06 Oct 2011 13:21:24 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-3244</guid>
		<description>deepak - that should be name=&quot;kfm_file[]&quot;

thanks. corrected.</description>
		<content:encoded><![CDATA[<p>deepak &#8211; that should be name=&#8221;kfm_file[]&#8221;</p>
<p>thanks. corrected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deepak</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-3243</link>
		<dc:creator>deepak</dc:creator>
		<pubDate>Thu, 06 Oct 2011 11:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-3243</guid>
		<description>how name=&quot;file[]&quot;
is link with kmp_file</description>
		<content:encoded><![CDATA[<p>how name=&#8221;file[]&#8221;<br />
is link with kmp_file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-2704</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 31 May 2011 14:57:30 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-2704</guid>
		<description>thanks Chris - corrected.</description>
		<content:encoded><![CDATA[<p>thanks Chris &#8211; corrected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://verens.com/2009/12/28/multiple-file-uploads-using-html5/#comment-2333</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 13 May 2011 21:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://verens.com/?p=945#comment-2333</guid>
		<description>Shouldn&#039;t that be $file[&#039;name&#039;] instead of $file[&#039;file&#039;] ?</description>
		<content:encoded><![CDATA[<p>Shouldn&#8217;t that be $file['name'] instead of $file['file'] ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

