There is no way to upload files using AJAX. How Gmail does it then? Well, the answer is using <iframe>. Here is a post that describe this technique in detail. Infact we are using this technique from months, obviously inspired by Gmail. 😉
update: Technically speaking, itâ€™s not Ajax. Just an iframe hack. You are absolutly right Pratik.