send FormData directly instead of URLSearchParams
This commit is contained in:
@@ -60,10 +60,9 @@ function eventListenerInitialize (form, inputs) {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
let fd = new URLSearchParams(new FormData(this)).toString();
|
|
||||||
axios.request({
|
axios.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: fd,
|
data: new FormData(this),
|
||||||
url: "account.php",
|
url: "account.php",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': "application/x-www-form-urlencoded"
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
|||||||
@@ -121,10 +121,9 @@ function loadDraft() {
|
|||||||
$(document.edit).on('submit', function(e) {
|
$(document.edit).on('submit', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var _this = this;
|
var _this = this;
|
||||||
let fd = new URLSearchParams(new FormData(this)).toString();
|
|
||||||
axios.request({
|
axios.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: fd,
|
data: new FormData(this),
|
||||||
url: "post.php",
|
url: "post.php",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': "application/x-www-form-urlencoded"
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
|||||||
Reference in New Issue
Block a user