<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Superdit.com &#187; extension uploader</title>
	<atom:link href="http://superdit.com/tag/extension-uploader/feed/" rel="self" type="application/rss+xml" />
	<link>http://superdit.com</link>
	<description>blogging, design, tech, and web</description>
	<lastBuildDate>Sat, 31 Mar 2012 20:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Extjs: Basic Multiple File Upload</title>
		<link>http://superdit.com/2010/07/17/extjs-basic-multiple-file-upload/</link>
		<comments>http://superdit.com/2010/07/17/extjs-basic-multiple-file-upload/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 00:20:33 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[Extjs]]></category>
		<category><![CDATA[extension uploader]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=1644</guid>
		<description><![CDATA[Uploading file on Extjs is quite simple you can use the ux plugin from example site or find the 3rd party plugins or extension (whatever you called it), in this post I want to implement the multiple upload using default plugins from extjs example one another one using 3rd party plugin called &#8220;awesome uploader&#8221; Using<a href="http://superdit.com/2010/07/17/extjs-basic-multiple-file-upload/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>Uploading file on Extjs is quite simple you can use the ux plugin from example site or find the 3rd party plugins or extension (whatever you called it), in this post I want to implement the multiple upload using default plugins from extjs example one another one using 3rd party plugin called &#8220;awesome uploader&#8221;</p>
<p><strong>Using Default Extjs Ux File Input</strong></p>
<p>You need to include these two files on your Extjs application, they are the js file in folder <em>&#8220;examples\ux\fileuploadfield\FileUploadField</em><em>.js&#8221; </em>and the css file in folder<em> &#8220;examples\ux\fileuploadfield\css\fileuploadfield.css&#8221;</em>, then<em> </em>you<em> can add field on the FormPanel with xtype &#8220;fileuploadfield&#8221; </em>and add config<em> &#8220;name&#8221; </em>(this will processed by server)<em> </em>for example in my formpanel<span id="more-1644"></span></p>
<pre class="brush: jscript; title: ; notranslate">
var form1 = new Ext.FormPanel({
    title: 'Multiple Upload With Default Uploader',
    renderTo: 'div-form-1', width: 320, buttonAlign: 'center',
    frame: true, fileUpload: true, style: 'margin: 0 auto;',
    items: [{
        xtype: 'fileuploadfield',
        emptyText: '',
        fieldLabel: 'File 1',
        buttonText: 'Select a File',
        name: 'ufile[]',
        id: 'form-file-1'
    }, {
        xtype: 'fileuploadfield',
        emptyText: '',
        fieldLabel: 'File 2',
        buttonText: 'Select a File',
        name: 'ufile[]',
        id: 'form-file-2'
    }, {
        xtype: 'fileuploadfield',
        emptyText: '',
        fieldLabel: 'File 3',
        buttonText: 'Select a File',
        name: 'ufile[]',
        id: 'form-file-3'
    }],
    buttons: [{
        text: 'Save',
        handler: function() {
            form1.getForm().submit({
                url: 'upload.php',
                waitMsg: 'Sending Data',
                success: function(form, o) {
                    alert(o.response.responseText);
                }
            });
        }
    }, {
        text: 'Reset',
        handler: function() {
            form1.getForm().reset();
        }
    }]
});
</pre>
<p>Now you can see those are very simple and to make multiple upload just use same name config on each file input and use the square bracket, server scripting will treated as an array, and on <em>upload.php</em> file you can use simple php file like this (and is up to you how server validate the file)</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

@move_uploaded_file($_FILES['ufile']['tmp_name'][0],
        'uploads/'.$_FILES['ufile']['name'][0]);
@move_uploaded_file($_FILES['ufile']['tmp_name'][1],
        'uploads/'.$_FILES['ufile']['name'][1]);
@move_uploaded_file($_FILES['ufile']['tmp_name'][2],
        'uploads/'.$_FILES['ufile']['name'][2]);

echo '{&quot;success&quot;:true}';

?&gt;
</pre>
<p><strong>Using Extjs Awesome Uploader Extension</strong></p>
<p>First download the file from this <a title="Extjs Awesome Uploader" href="http://jsjoy.com/blog/?page_id=38" target="_blank">jsjoy.com blog</a><em> </em>you can find the download link at the end of the post, and I won&#8217;t tell in a detail post cause that blog have already quite good detail, here&#8217;s only what I can tell.</p>
<p>When you download and extract the file it generated many file these file have to be included in your Extjs application to make this work, they are <em>Ext.ux.form.FileUploadField.js, Ext.ux.XHRUpload.js, swfupload.js, swfupload.swfobject.js, </em>and <em>AwesomeUploader.js</em>. These plugins require flash player and support multiple file and drag and drop file uplader from your desktop, it is cool isn&#8217;t, but the missing things from this extension (when I try this on my localhost), is the file is always automatic upload, I cannot find the configuration to turn off the automatic upload, and the last word I suggest you read all the config option that avaliable.</p>
<p>And I have tried on my localhost server see the screenshot below</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-1706" title="localhost_extest_my_upload_upload_html" src="http://superdit.com/wp-content/uploads/2010/07/localhost_extest_my_upload_upload_html.png" alt="Extjs Basic Multiple=" /></p>
<p style="text-align: center;"><a title="Extjs Awesome Uploader" href="http://jsjoy.com/blog/?page_id=38" target="_blank">Visit Awesome Uploader</a> | <a title="Extjs Sample Basic Multiple Upload" href="http://www.box.net/shared/u760h6qxra" target="_blank">Download Source</a></p>
<p><strong>Other Resource</strong></p>
<p><a title="Ext.ux.UploadForm ver. 1.0-beta2" href="http://www.aariadne.com/uploadform/" target="_blank">http://www.aariadne.com/uploadform/</a> it is the older 3rd party plugin file uploader, very nice interface but I cannot find the download link to this file, and hope the author continue this great work.</p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2010/07/17/extjs-basic-multiple-file-upload/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

