27.02.2023, 13:16
(22.02.2023, 14:10)admin Wrote: Use this JavaScript as a starting point:
Code:12345678910111213141516async function send() { var formdata = new FormData(); var url = '/scada-main/general/restore'; var el = document.getElementById('file'); formdata.append('file', el.files[0]); var resp = await fetch(url, { method: 'POST', headers: { 'X-Requested-With': 'XMLHttpRequest' }, body: formdata }); var res = await resp.json(); console.log(res); }
Where should I write the path of the project file i want to restore ?