projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5e6688
)
luci-base: luci.js: support passing FormData as request payload
author
Jo-Philipp Wich
<jo@mein.io>
Tue, 3 Sep 2019 14:48:31 +0000
(16:48 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Tue, 10 Sep 2019 13:28:16 +0000
(15:28 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/luci.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/luci.js
b/modules/luci-base/htdocs/luci-static/resources/luci.js
index a9ddccf359b23599b50704975a9e36ef4d78488e..b4c727a3997d004d85b2ceb81a9938978720554e 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/luci.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/luci.js
@@
-360,8
+360,13
@@
break;
case 'object':
- content = JSON.stringify(opt.content);
- contenttype = 'application/json';
+ if (!(opt.content instanceof FormData)) {
+ content = JSON.stringify(opt.content);
+ contenttype = 'application/json';
+ }
+ else {
+ content = opt.content;
+ }
break;
default: