From 4dbf9b2dfa0e45947a62394123fc7993f048532e Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 23 Feb 2019 03:50:00 +0100 Subject: Fix sending multipart/form-data with CallAgent --- .../src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision') 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 { 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) -- cgit