I am trying to upload a string which stores contents of a pdf in base64 to server. In my earlier approach I was using following code
var form = new FormData();
form.append("file", fs.createReadStream(filePath));
let response=await axios.post(url, form, {headers: {
...form.getHeaders(),
}});
But in this approach I had to write string contents to temporary file first. I want to avoid it. So I need some help. The data in string is obtained from PDFMake tool.