PhoneGap chunckedMode true upload error


here's my javascript phonegap code, and, when i try tu upload a little file with the chunckedMode = true, the ft.upload redirect on the error handler. I don't really understand what's the problem source.

function uploadFile() {

  function uploadSuccess(success)
  {
    alert('good');
    //alert(JSON.stringify(success.response));
  }

  function uploadError(error)
  {
    alert('error');
    alert(error.response);
  }

  var options = new FileUploadOptions();
  options.fileKey="document";
  options.fileName=file.substr(file.lastIndexOf('/')+1);
  options.mimeType="application/octet-stream";

  var params = new Object();
  params.value1 = "test";
  params.value2 = "param";

  options.params = params;
  options.chunkedMode = true;

  var ft = new FileTransfer();

  ft.upload(file, "http://myserver/file.php", uploadSuccess, uploadError, options);
  alert('after up');
}

I finally solved my problem :

Step one :

Download NGINX Chunkin Module : https://github.com/agentzh/chunkin-nginx-module

Step two :

reconfigure nginx with --add-module=/path/to/the/module

Re-install it..

Step three :

Go to the vhost configuration file add this (code into the braces) :

server {
        chunkin on;

        error_page 411 = @my_411_error;
        location @my_411_error {
            chunkin_resume;
        }

        ...
      }

Now your nginx server accept the chunked mode file transfer.