Upload Image using ajaxupload
<p>I am using <a href="http://code.google.com/p/aspnet-mvc-dynamic-file-upload-example/source/browse/trunk/MultiFileUpload/Scripts/ajaxupload.3.5.js?r=2" rel="nofollow">Ajax Upload</a> for file upload via ajax and php.
At js file i wrote following line of code:</p>

<pre><code>$(document).ready(function() {
    if ($('#uploadExists').length) {
        var btnUpload = $('#uploadExists');
        var u = new AjaxUpload(btnUpload, {
            action: '/upload',
            name: 'fname',
            onSubmit: function(file, ext){
                if (! (ext &amp;&amp; /^(jpg|png|jpeg|gif)$/.test(ext))) {
                        //Bad file                                                                                                                                                                         
                    return false;
                }
            },
            onComplete: function(file, response){
                if (! (/(\.jpg|\.png|\.jpeg|\.gif)/.test(response))) {
                    //Bad file                                                                                                                                                                             
                    console.log(response);
                    return false;
                } else {
                    console.log(response);
            }
        }
        });
    }
});
</code></pre>

<p>At <code>/upload</code> url what should I do?
I am writing things in <code>PHP.</code> </p>
