title: Fine Uploader cannot upload the file
body: <p>I am using the file uploader jquery plugin in order to have ajax file uploading on my site. However I just cannot figure out what is going wrong and why it doesn't work.</p>
  
  <p>Plugin: <a href="http://fineuploader.com/index.html" rel="nofollow">http://fineuploader.com/index.html</a></p>
  
  <p>My code:</p>
  
  <p>I took the code directly from their demo:</p>
  
  <pre><code>$(document).ready(function() {
  $fub = $('#fine-uploader-basic');
  $messages = $('#messages');
  
  var uploader = new qq.FileUploaderBasic({
    button: $fub[0],
    action: 'http://localhost/script/file_upload/upload_test',
    debug: true,
    allowedExtensions: ['jpeg', 'jpg', 'gif', 'png'],
    sizeLimit: 204800, // 200 kB = 200 * 1024 bytes
    onSubmit: function(id, fileName) {
      $messages.append('&lt;div id="file-' + id + '" class="alert" style="margin: 20px 0 0"&gt;&lt;/div&gt;');
    },
    onUpload: function(id, fileName) {
      $('#file-' + id).addClass('alert-info')
                      .html('&lt;img src="client/loading.gif" alt="Initializing. Please hold."&gt; ' +
                            'Initializing ' +
                            '“' + fileName + '”');
    },
    onProgress: function(id, fileName, loaded, total) {
      if (loaded &lt; total) {
        progress = Math.round(loaded / total * 100) + '% of ' + Math.round(total / 1024) + ' kB';
        $('#file-' + id).removeClass('alert-info')
                        .html('&lt;img src="client/loading.gif" alt="In progress. Please hold."&gt; ' +
                              'Uploading ' +
                              '“' + fileName + '” ' +
                              progress);
      } else {
        $('#file-' + id).addClass('alert-info')
                        .html('&lt;img src="client/loading.gif" alt="Saving. Please hold."&gt; ' +
                              'Saving ' +
                              '“' + fileName + '”');
      }
    },
    onComplete: function(id, fileName, responseJSON) {
      if (responseJSON.success) {
        $('#file-' + id).removeClass('alert-info')
                        .addClass('alert-success')
                        .html('&lt;i class="icon-ok"&gt;&lt;/i&gt; ' +
                              'Successfully saved ' +
                              '“' + fileName + '”' +
                              '&lt;br&gt;&lt;img src="img/success.jpg" alt="' + fileName + '"&gt;');
      } else {
        $('#file-' + id).removeClass('alert-info')
                        .addClass('alert-error')
                        .html('&lt;i class="icon-exclamation-sign"&gt;&lt;/i&gt; ' +
                              'Error with ' +
                              '“' + fileName + '”: ' +
                              responseJSON.error);
      }
    }
  });
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="fine-uploader-basic" class="btn btn-success"&gt;
    &lt;i class="icon-upload icon-white"&gt;&lt;/i&gt; Click to upload
  &lt;/div&gt;
  &lt;div id="messages"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>public function upload_test() {
    $upload = move_uploaded_file('./user_files', $_FILES['qqfile']['tmp_name']);
    if($upload) {
      echo json_encode(array('success' =&gt; true));
    } else {
      echo json_encode(array('success' =&gt; false, 'error' =&gt; $upload));
    }
  }
  </code></pre>
  
  <p>I think the problem is with the PHP, but I can't figure out what im doing wrong. Please help before I go insane.</p>
  
  <p>Thank you.</p>