mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Added support for JavaScript FormData
As preparation for 2FA plugins and easier Fetch calls
This commit is contained in:
parent
5a0f6c2b9f
commit
0a69c6410d
5 changed files with 26 additions and 31 deletions
|
|
@ -47,7 +47,11 @@ abort = (sAction, bClearOnly) => {
|
|||
fetchJSON = (action, sGetAdd, params, timeout, jsonCallback) => {
|
||||
sGetAdd = pString(sGetAdd);
|
||||
params = params || {};
|
||||
params.Action = action;
|
||||
if (params instanceof FormData) {
|
||||
params.set('Action', action);
|
||||
} else {
|
||||
params.Action = action;
|
||||
}
|
||||
let init = {};
|
||||
if (window.AbortController) {
|
||||
abort(action);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue