I was wondering if anyone knew of a widget that I could use to list/open a local/remote file within the GWT.
I thought I could use the FileUpload object but I can't figure out how to tell it where to browse.
Is it po开发者_如何学JAVAssible to tell the FileUpload object to look somewhere other than the local filesystem?
If not is there a simple widget where I can point it to a directory albeit local or remote via RPC?
Thanks,
C
This isn't a GWT issue, it's an issue of what's possible within a web app. Web apps cannot browse the local hard drive using only JavaScript and HTML, nor can they browse arbitrary remote sites.
You can create a button that when pressed, prompts the user to select a file from their local computer. Your web app then gets access to the path to that one file - but nothing else.
To actually browse local files within your web app, the only solution is to use Flash or Java.
精彩评论