diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2018-05-09 12:57:07 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-05-09 12:57:07 +0300 |
commit | 622f8f0eca885a6cc01c9927fdaa22342133b63b (patch) | |
tree | a794a160dc3e2c610e13ad99205a495c0b6ed2c0 /client | |
parent | 16e394956f6150928f7eeb20c4650ee504602401 (diff) | |
download | vaadin-framework-622f8f0eca885a6cc01c9927fdaa22342133b63b.tar.gz vaadin-framework-622f8f0eca885a6cc01c9927fdaa22342133b63b.zip |
Use XMLHttpRequest2 API for HTML5 DnD uploads (#10896)
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/extensions/FileDropTargetConnector.java | 5 |
1 files changed, 3 insertions, 2 deletions
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); }-*/; } |