<?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: Drag and drop file uploading using JavaScript</title>
	<atom:link href="http://www.thecssninja.com/javascript/drag-and-drop-upload/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thecssninja.com/javascript/drag-and-drop-upload</link>
	<description>All things CSS, JavaScript &#38; HTML</description>
	<lastBuildDate>Sat, 21 Jan 2012 04:46:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: davis</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2771</link>
		<dc:creator>davis</dc:creator>
		<pubDate>Wed, 26 Oct 2011 19:30:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2771</guid>
		<description>Hey, I built something similar using the new File API here: https://github.com/davisford/kickstarter -- it is the whole thing (client/server with a Java/Jetty/CXF REST backend and jQuery / jQueryUI front end).

I dev&#039;d using Chrome, and it may have issues with FF and IE -- I dunno...didn&#039;t spend any time trying them, but feel free to use it as a starter project for drag-n-drop fileupload. It also includes optional md5 calculation in JavaScript -- can send all the file metadata as additional post XML (deserialized with JAXB), and includes progress bar polling:

step 1: $ git clone git://github.com/davisford/kickstarter.git
step 2: $ mvn jetty:run
step 3: Open chrome http://localhost:8080
step 4: drag-n-drop files
step 5: submit button
step 6: ...there is no step 6</description>
		<content:encoded><![CDATA[<p>Hey, I built something similar using the new File API here: <a href="https://github.com/davisford/kickstarter" rel="nofollow">https://github.com/davisford/kickstarter</a> &#8212; it is the whole thing (client/server with a Java/Jetty/CXF REST backend and jQuery / jQueryUI front end).</p>
<p>I dev&#8217;d using Chrome, and it may have issues with FF and IE &#8212; I dunno&#8230;didn&#8217;t spend any time trying them, but feel free to use it as a starter project for drag-n-drop fileupload. It also includes optional md5 calculation in JavaScript &#8212; can send all the file metadata as additional post XML (deserialized with JAXB), and includes progress bar polling:</p>
<p>step 1: $ git clone git://github.com/davisford/kickstarter.git<br />
step 2: $ mvn jetty:run<br />
step 3: Open chrome <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a><br />
step 4: drag-n-drop files<br />
step 5: submit button<br />
step 6: &#8230;there is no step 6</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Seddon</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2636</link>
		<dc:creator>Ryan Seddon</dc:creator>
		<pubDate>Thu, 07 Jul 2011 01:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2636</guid>
		<description>@&lt;a href=&quot;#comment-2622&quot; rel=&quot;nofollow&quot;&gt;Troy&lt;/a&gt; -

You can pass custom headers in the XHR request e.g.

&lt;pre lang=&quot;javascript&quot;&gt;
xhr.setRequestHeader(&quot;X-File-Name&quot;, file.name);
xhr.setRequestHeader(&quot;X-File-Size&quot;, file.size);
&lt;/pre&gt;

Then on the server side just look for those headers to get the file info.</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-2622" rel="nofollow">Troy</a> -</p>
<p>You can pass custom headers in the XHR request e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript javascript" style="font-family:monospace;">xhr.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;X-File-Name&quot;</span><span style="color: #339933;">,</span> file.<span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span>;
xhr.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;X-File-Size&quot;</span><span style="color: #339933;">,</span> file.<span style="color: #660066;">size</span><span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>Then on the server side just look for those headers to get the file info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troy</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2622</link>
		<dc:creator>Troy</dc:creator>
		<pubDate>Sun, 26 Jun 2011 01:08:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2622</guid>
		<description>This is great but I can&#039;t make upload.php work. I can save the file but how do I get the original file name and is there a way I can pass in an extra parameter like a destination directory?</description>
		<content:encoded><![CDATA[<p>This is great but I can&#8217;t make upload.php work. I can save the file but how do I get the original file name and is there a way I can pass in an extra parameter like a destination directory?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Css Ninja</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2486</link>
		<dc:creator>The Css Ninja</dc:creator>
		<pubDate>Wed, 06 Apr 2011 04:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2486</guid>
		<description>@&lt;a href=&quot;#comment-2481&quot; rel=&quot;nofollow&quot;&gt;Rajkumar Singh&lt;/a&gt; - 

This doesn&#039;t work in IE.</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-2481" rel="nofollow">Rajkumar Singh</a> &#8211; </p>
<p>This doesn&#8217;t work in IE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajkumar Singh</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2481</link>
		<dc:creator>Rajkumar Singh</dc:creator>
		<pubDate>Sun, 03 Apr 2011 10:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2481</guid>
		<description>I have download the code and run in our server. But in IE it&#039;s does not Work. And the another problem I am facing to save the images.</description>
		<content:encoded><![CDATA[<p>I have download the code and run in our server. But in IE it&#8217;s does not Work. And the another problem I am facing to save the images.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 使用HTML5的FileAPI实现拖拽上传-传播、沟通、分享-一直“有你”</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2223</link>
		<dc:creator>使用HTML5的FileAPI实现拖拽上传-传播、沟通、分享-一直“有你”</dc:creator>
		<pubDate>Fri, 19 Nov 2010 02:17:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2223</guid>
		<description>[...] 了解更多请阅读Drag and drop file uploading using JavaScript和The File API has changed [...]</description>
		<content:encoded><![CDATA[<p>[...] 了解更多请阅读Drag and drop file uploading using JavaScript和The File API has changed [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 使用HTML5的FileAPI实现拖拽上传 - Hi, I&#8217;m Adam Lu.</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2220</link>
		<dc:creator>使用HTML5的FileAPI实现拖拽上传 - Hi, I&#8217;m Adam Lu.</dc:creator>
		<pubDate>Thu, 18 Nov 2010 10:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2220</guid>
		<description>[...] 了解更多请阅读Drag and drop file uploading using JavaScript和The File API has changed [...]</description>
		<content:encoded><![CDATA[<p>[...] 了解更多请阅读Drag and drop file uploading using JavaScript和The File API has changed [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Css Ninja</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2149</link>
		<dc:creator>The Css Ninja</dc:creator>
		<pubDate>Mon, 18 Oct 2010 01:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2149</guid>
		<description>@lucke84 -

&lt;blockquote&gt;...what if i’d like to check which is the extension of the file i’m going to upload?&lt;/blockquote&gt;

You can check a files mime type from within the &lt;a href=&quot;https://developer.mozilla.org/en/DOM/File&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;File&lt;/code&gt; object&lt;/a&gt; by using the &lt;code&gt;type&lt;/code&gt; attribute e.g.

&lt;pre lang=&quot;javascript&quot;&gt;
event.dataTransfer.files[0].type
&lt;/pre&gt;

If you drop an image it will populate the type with image/jpg or png or gif. With that information you can then do a check and force it to only accept certain files. If a files mime type isn&#039;t known the type attribute is an empty string.</description>
		<content:encoded><![CDATA[<p>@lucke84 -</p>
<blockquote><p>&#8230;what if i’d like to check which is the extension of the file i’m going to upload?</p></blockquote>
<p>You can check a files mime type from within the <a href="https://developer.mozilla.org/en/DOM/File" rel="nofollow"><code>File</code> object</a> by using the <code>type</code> attribute e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript javascript" style="font-family:monospace;">event.<span style="color: #660066;">dataTransfer</span>.<span style="color: #660066;">files</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">type</span></pre></div></div>

<p>If you drop an image it will populate the type with image/jpg or png or gif. With that information you can then do a check and force it to only accept certain files. If a files mime type isn&#8217;t known the type attribute is an empty string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lucke84</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2147</link>
		<dc:creator>lucke84</dc:creator>
		<pubDate>Fri, 15 Oct 2010 22:32:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2147</guid>
		<description>Great job with this article! 

A question for you: what if i&#039;d like to check which is the extension of the file i&#039;m going to upload? in your opinion, can i know it before actually doing the the post? I googled a lot but i can&#039;t find how to ask xhr object the filename of the one i&#039;m uploading.</description>
		<content:encoded><![CDATA[<p>Great job with this article! </p>
<p>A question for you: what if i&#8217;d like to check which is the extension of the file i&#8217;m going to upload? in your opinion, can i know it before actually doing the the post? I googled a lot but i can&#8217;t find how to ask xhr object the filename of the one i&#8217;m uploading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Css Ninja</title>
		<link>http://www.thecssninja.com/javascript/drag-and-drop-upload/comment-page-1#comment-2142</link>
		<dc:creator>The Css Ninja</dc:creator>
		<pubDate>Tue, 12 Oct 2010 22:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.thecssninja.com/?p=430#comment-2142</guid>
		<description>@Deepak - There is a &lt;a href=&quot;#usermessagea&quot; rel=&quot;nofollow&quot;&gt;big red&lt;/a&gt; update box at the start of the article pointing to an updated version of this demo and also going into the changes for the File API, &lt;code&gt;getAsDataURL()&lt;/code&gt; doesn&#039;t exist anymore and is replaced with the FileReader object which has &lt;code&gt;readAsDataURL()&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>@Deepak &#8211; There is a <a href="#usermessagea" rel="nofollow">big red</a> update box at the start of the article pointing to an updated version of this demo and also going into the changes for the File API, <code>getAsDataURL()</code> doesn&#8217;t exist anymore and is replaced with the FileReader object which has <code>readAsDataURL()</code>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

