You cannot upload files with ajax. Use the form plugin for that functionality.
> I'm wondering is there a way to pass form data to $.ajax()? > let's say I want to upload a file, what is the correct way? > passing the content of the input type="file" this way > $('#myInput').val() > doesn't work. > How is that done? > thank you > andrea >