开发者

GWT - Client-Side File Uploads

I have been messing around with GWT uploads lately. I want to have 开发者_Python百科the ability to upload an XML file from the client, and get the contents of that file (display the contents in a TextArea).

From what I have found on the net, it seems I would have to upload the file to the server, and then get the contents of the file. I do not particularly like the idea of allowing file uploads to the server (even if they are only XML). Is there anyway to pull the contents of a file that the client specifies without sending it to the server?

Thanks


Recent (decent?) browsers implement the "HTML5" File API that's quite easy to use in GWT using JSNI.
See also: https://developer.mozilla.org/en/Using_files_from_web_applications


Because of security restrictions you cannot access the file on the client side alone. It has to be sent to the server for processing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜