From 622f8f0eca885a6cc01c9927fdaa22342133b63b Mon Sep 17 00:00:00 2001 From: Ilia Motornyi Date: Wed, 9 May 2018 12:57:07 +0300 Subject: Use XMLHttpRequest2 API for HTML5 DnD uploads (#10896) --- .../java/com/vaadin/client/extensions/FileDropTargetConnector.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/src') diff --git a/client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java b/client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java index 698518fe2c..7fb872f319 100644 --- a/client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java +++ b/client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java @@ -199,8 +199,9 @@ public class FileDropTargetConnector extends DropTargetExtensionConnector { public final native void postFile(File file) /*-{ - this.setRequestHeader('Content-Type', 'multipart/form-data'); - this.send(file); + var formData = new $wnd.FormData(); + formData.append("File", file); + this.send(formData); }-*/; } -- cgit v1.2.3