Monday, August 08, 2011

jQuery file upload plugin: AjaxFileUpload

We can use AjaxFileUpload make a file upload process.

Basic usage:
function ajaxFileUpload()
{
  $.ajaxFileUpload({
    url:'upload.php',
    secureuri:false,
    fileElementId:'fileToUpload',
    data:{name:'logan', id:'id'},
    success: function (data, status) {
      alert($(data).text());
    }
  });
  return false;
}

Official Guide have more detail usage.

No comments: