jiakuan / gwt-uploader

An API to enable sophisticated file upload capabilities within a GWT application.
http://gwt-uploader.appspot.com/
Apache License 2.0
11 stars 6 forks source link

make openFileDialog publicly available #8

Open mseele opened 4 years ago

mseele commented 4 years ago

we need this to open the file dialog to select a file from somewhere else in the ui than the upload button

please see pr https://github.com/jiakuan/gwt-uploader/pull/7 who fixes this

mseele commented 4 years ago

also helpfull to make a ui like this:

https://dribbble.com/shots/6652639--Daily-UI-File-Upload

mseele commented 4 years ago

workaround for me right now is using this method:

private native void openFileDialog(Uploader uploader) /*-{
    var fileUpload = uploader.@org.wisepersist.gwt.uploader.client.Uploader::fileUpload;
    uploader.@org.wisepersist.gwt.uploader.client.Uploader::openFileDialog(Lcom/google/gwt/user/client/ui/FileUpload;Z)(fileUpload, false);
}-*/;
jiakuan commented 1 year ago

The PR has been merged.

The sample UI looks great, but any PRs are welcome.