Say I want to upload the following information to a server:
var info = {
name: "John",
age: 30,
resume: resume.pdf // base64 String
};
My AJAX
call might look something like this:
$.ajax({
url: "http://example.com",
type: "POST",
dataType: "JSON",
data: info,
success: function (response){
// do something
}
});
My question is how to modify an AJAX
call to upload the resume.pdf
file (resume property) as base64 String to the server?