We have a modal form with an input of type file. We want to upload the file to the server when the user clicks 'Save'. We don't want to actually refresh the page, but simply close the modal.
Can we upload a file via $.ajax? Otherwise, what tools are available for uploading files behind the scenes?