#104 jquery convert as javascript

This commit is contained in:
Agriya Dev5
2021-05-25 12:54:59 +05:30
parent 205caea40e
commit deafa04d2e

View File

@@ -22,7 +22,15 @@ export default {
const svg = '<?xml version="1.0" encoding="UTF-8"?>\n' + data,
filename = getFileNameFromTitle();
$.post(saveSvgAction, { output_svg: svg, filename });
// $.post(saveSvgAction, { output_svg: svg, filename });
let postData = { output_svg: svg, filename };
fetch(saveSvgAction, {
method: "POST",
body: JSON.stringify(postData)
}).then( (res) => {
return res;
})
.catch( (error) => { console.info('error =', error);});
}
});
}