finally able to make an AJAX file upload