Skip to content

Commit c85fe9d

Browse files
committed
Update ProgressReport3.aspx
1 parent c716d68 commit c85fe9d

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

source code/TestDebugASPNET/pages/ProgressReport3.aspx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,12 @@
189189
disableButtons();
190190
191191
try {
192-
const result = await fetchAPI(urlApiEndpoint + '?action=start_backup', {
193-
method: 'POST'
192+
const formData = new FormData();
193+
formData.append('action', 'start_backup');
194+
195+
const result = await fetchAPI(urlApiEndpoint, {
196+
method: 'POST',
197+
body: formData
194198
});
195199
196200
if (result.ok && result.data) {
@@ -219,9 +223,10 @@
219223
220224
try {
221225
const formData = new FormData();
226+
formData.append('action', 'start_restore');
222227
formData.append('file', fileRestore.files[0]);
223228
224-
const result = await fetchAPI(urlApiEndpoint + '?action=start_restore', {
229+
const result = await fetchAPI(urlApiEndpoint, {
225230
method: 'POST',
226231
body: formData
227232
});
@@ -247,8 +252,13 @@
247252
}
248253
249254
try {
250-
const result = await fetchAPI(urlApiEndpoint + `?action=stop&taskid=${currentTaskId}`, {
251-
method: 'POST'
255+
const formData = new FormData();
256+
formData.append('action', 'stop');
257+
formData.append('taskid', currentTaskId);
258+
259+
const result = await fetchAPI(urlApiEndpoint, {
260+
method: 'POST',
261+
body: formData
252262
});
253263
254264
if (result.ok) {

0 commit comments

Comments
 (0)