diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-02-23 03:50:00 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-02-23 03:50:00 +0100 |
commit | 4dbf9b2dfa0e45947a62394123fc7993f048532e (patch) | |
tree | 64c1cb88cc2f77e17d149b0ef983ace603558be3 /kvision-modules/kvision-remote/src | |
parent | 06932f79c9599722d4d9c659466fdbc27e37dfa5 (diff) | |
download | kvision-4dbf9b2dfa0e45947a62394123fc7993f048532e.tar.gz kvision-4dbf9b2dfa0e45947a62394123fc7993f048532e.tar.bz2 kvision-4dbf9b2dfa0e45947a62394123fc7993f048532e.zip |
Fix sending multipart/form-data with CallAgent
Diffstat (limited to 'kvision-modules/kvision-remote/src')
-rw-r--r-- | kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt index 06dd1330..eb88ba8b 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt @@ -118,9 +118,10 @@ open class CallAgent { ): Promise<dynamic> { return Promise { resolve, reject -> jQuery.ajax(url, obj { - this.contentType = contentType + this.contentType = if (contentType != "multipart/form-data") contentType else false this.data = data this.method = method.name + this.processData = if (contentType != "multipart/form-data") undefined else false this.success = { data: dynamic, _: Any, _: Any -> resolve(data) |