开发者

Check the file existence on the client side of GWT

开发者 https://www.devze.com 2023-02-27 04:42 出处:网络
I want to check the file existence of the client side of GWT, by using FileUpload and FormPanel. Since it is not possible to use java.io.File on the client side, does开发者_如何学JAVA anybody know how

I want to check the file existence of the client side of GWT, by using FileUpload and FormPanel. Since it is not possible to use java.io.File on the client side, does开发者_如何学JAVA anybody know how to do this?

Thanks in advance! Ike


It is not possible to check in javascript in the browser, whether a file exists or not. A file upload form does not give you the path to the file it is uploading (otherwise, it'd be a security hole!).

There is no reason why the browser needs to check the client side's file system.

An alternative would be either to use a java applet, and get the appropriate certificates/user permission so that it can read off disk, or some such browser plugin that also can perform disk reads (read: activeX plugins for IE)

0

精彩评论

暂无评论...
验证码 换一张
取 消