Storing generated PDF files on the server

Using the

jsPDF

plugin, I am creating a

.pdf

file and generating a download based on a button click. I would like to save the file onto my server instead of initiating the download. So when the button is clicked I would like the file to be saved in :

/tmp/uploads/pdf/example.pdf

I am aware I need have to use

Jquery.Ajax

to post the file to the server. However, looking at the documentation and I didn't see any support for