Download data from URL with GWT
This is a typical img with src having a blob:
<img class="gwt-Image" src="blob:a7cb8111-cf35-4c3a-8295-bdda0ff66caf">
Is there a way for my GWT app to download get his blob data for client side manipulation?
I've tried this:
private native String blobToBase64(String source)/*-{
var xhr = new XMLHttpRequest();
xhr.open('GET', source, true);
xhr.responseType = 'blob';
xhr.onload = function(e) {
if (this.status == 200) {
var myBlob = this.response;
alert("Converted to Blob");
}
};
xhr.send();
}-*/;
However, alert box does not show up when passed the blob source, so it does not work. And the `this.status` response is `0`
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home