Thursday, March 17, 2016

Uploading Local Image Content


  Dear friends,

  i am trying to upload a file system image's content to my GWT site and i stumbled across this code:

  
   public final native void readAsDataURL(MyClass that, FileUpload input) /*-{       var files = input.@com.google.gwt.user.client.ui.FileUpload::getElement()().files;       var reader = new FileReader();         reader.onload = function (evt) {           that.@...MyClass::done(Ljava/lang/String;)(evt.target.result);       }       reader.readAsDataURL(files[0]);      }-*/;


I am assuming that some attribute of MyClass is receiving the image's content. But i dont know neither what
attribute is that nor how to choose another one.

Could someone help me?

Best Regards!

--
You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment