Is it possible to upload file via request factory? Simple example will be really helpful.
Actually you can!, I have an application doing it already.
Bean
attribute in your app and send it via RF, RPC, etc.Here you have a copy/paste of the most significant code i use:
public final native void readAsDataURL(MyClass that, FileUpload input) /*-{
var files = [email protected]::getElement()().files;
var reader = new FileReader();
reader.onload = function (evt) {
[email protected]::done(Ljava/lang/String;)(evt.target.result);
}
reader.readAsDataURL(files[0]);
}-*/;
It would be a comming-soon feature on my gwtupload library.