I'm trying to send xml string as a .xml file to server but I unable to find any solution for that. Can someone please tell me how to do that?
I tried this but didn't worked
const xml = "<Session>
<TestTargetTagSession>TestSession</TestTargetTagSession>
</Session>"
const formData = new FormData();
formData.append('file', {
file: xml,
type: 'xml',
name: 'demo.xml',
});
Please help