summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-10-15 14:12:46 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-10-15 14:12:46 +0000
commit75276b324a988beea02275f86a7209aa94e65587 (patch)
tree69d7030cb33530d6bdae926f805b07dba5feee33 /src/com/vaadin/terminal
parent29216ce18884f1465ebc744aff0b5e28c24702bd (diff)
downloadvaadin-framework-75276b324a988beea02275f86a7209aa94e65587.tar.gz
vaadin-framework-75276b324a988beea02275f86a7209aa94e65587.zip
removed unused code from html5 file handling (old FF36 support via multipartrequest)
svn changeset:15568/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/terminal')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java25
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/dd/VHtml5File.java25
2 files changed, 0 insertions, 50 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java b/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java
index 53cce64bbc..33b05c881d 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java
@@ -10,7 +10,6 @@ import java.util.Map;
import java.util.Set;
import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseDownHandler;
@@ -340,9 +339,6 @@ public class VDragAndDropWrapper extends VCustomComponent implements
public final native void postFile(VHtml5File file)
/*-{
- // Accept header is readable in portlets resourceRequest
- // TODO add filename and mime type too??
- this.setRequestHeader('Accept', 'text/html,vaadin/filexhr');
this.setRequestHeader('Content-Type', 'multipart/form-data');
this.send(file);
}-*/;
@@ -368,27 +364,6 @@ public class VDragAndDropWrapper extends VCustomComponent implements
return client.getPid(this);
}
- private native void multipartSend(JavaScriptObject xhr,
- JavaScriptObject data, String name)
- /*-{
-
- var boundaryString = "------------------------------------------VAADINXHRFILEUPLOAD";
- var boundary = "--" + boundaryString;
- var CRLF = "\r\n";
- xhr.setRequestHeader("Content-type", "multipart/form-data; boundary=\"" + boundaryString + "\"");
- var requestBody = boundary
- + CRLF
- + "Content-Disposition: form-data; name=\""+name+"\"; filename=\"file\""
- + CRLF
- + "Content-Type: application/octet-stream" // hard coded, type sent separately
- + CRLF + CRLF + data.target.result + CRLF + boundary + "--" + CRLF;
- xhr.setRequestHeader("Content-Length", requestBody.length);
-
-
- xhr.sendAsBinary(requestBody);
-
- }-*/;
-
public VDropHandler getDropHandler() {
return dropHandler;
}
diff --git a/src/com/vaadin/terminal/gwt/client/ui/dd/VHtml5File.java b/src/com/vaadin/terminal/gwt/client/ui/dd/VHtml5File.java
index 2e72eead9e..756d102690 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/dd/VHtml5File.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/dd/VHtml5File.java
@@ -4,8 +4,6 @@ import com.google.gwt.core.client.JavaScriptObject;
/**
* Wrapper for html5 File object.
- *
- * TODO gear support?
*/
public class VHtml5File extends JavaScriptObject {
@@ -27,27 +25,4 @@ public class VHtml5File extends JavaScriptObject {
return this.size ? this.size : 0;
}-*/;
- public native final void readAsBinary(final Callback callback)
- /*-{
- var r = new FileReader();
- r.onloadend = function(content) {
- callback.@com.vaadin.terminal.gwt.client.ui.dd.VHtml5File.Callback::handleFile(Lcom/google/gwt/core/client/JavaScriptObject;)(content);
- };
- r.readAsBinaryString(this);
- var j = 0;
-
- }-*/;
-
- public native final void readAsDataUrl(final Callback callback)
- /*-{
- var r = new FileReader();
- r.onloadend = function(content) {
- callback.@com.vaadin.terminal.gwt.client.ui.dd.VHtml5File.Callback::handleFile(Lcom/google/gwt/core/client/JavaScriptObject;)(content);
- };
- r.readAsDataURL(this);
- }-*/;
-
- public interface Callback {
- public void handleFile(JavaScriptObject object);
- }
}