diff options
author | Maxim Devaev <[email protected]> | 2021-07-28 14:58:10 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2021-07-28 14:58:10 +0300 |
commit | 9aa3998924bc484476b620ce4957add2b7ee60f5 (patch) | |
tree | 3bb662202d54042e4ed7329d90e0f73030c16137 /web | |
parent | 801b290ac67de03810704f523faae6cf53bb4186 (diff) |
get rid of multipart in /msd/write
Diffstat (limited to 'web')
-rw-r--r-- | web/share/js/kvm/msd.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/web/share/js/kvm/msd.js b/web/share/js/kvm/msd.js index 25c68b01..e7ed1070 100644 --- a/web/share/js/kvm/msd.js +++ b/web/share/js/kvm/msd.js @@ -99,16 +99,11 @@ export function Msd() { }; var __clickUploadNewImageButton = function() { - let form_data = new FormData(); - form_data.append("image", __image_file.name); - form_data.append("size", __image_file.size); - form_data.append("data", __image_file); - __upload_http = new XMLHttpRequest(); - __upload_http.open("POST", "/api/msd/write", true); + __upload_http.open("POST", `/api/msd/write?image=${encodeURIComponent(__image_file.name)}`, true); __upload_http.upload.timeout = 15000; __upload_http.onreadystatechange = __uploadStateChange; - __upload_http.send(form_data); + __upload_http.send(__image_file); }; var __uploadStateChange = function() { |