GWT文件上载如何工作? [英] How GWT fileupload works?
问题描述
GWT
文件上传的工作原理吗?我知道 FileUpload
小部件以及如何使用它。我想知道它的内在机制是什么。我们无法从客户端的 FileUpload
小部件获取文件的内容,以及它如何进入服务器?我google了,但我没有得到解决方案。 在此先感谢。
GWT的文件上传 使用 HTML的输入元素 。 html input元素是原生html dom元素,它允许从系统中选择文件。
选择后,您需要将其提交给您的服务器。这是由GWT的 FormPanel 。
特别是,FileUpload仅在FormPanel中使用时才有用,因为浏览器只会使用 表单提交 strong>。 注意: 2)如果您关心在客户端处理文件而不是将文件推送到服务器,那么您的选项有限正如在这里提到@如何从GWT FileUpload组件检索文件? > Anybody know how Thanks in advance. GWT's file upload makes use HTML's input element. The html input element is native html dom element which allows to select files from your system. After selection you need to submit it to your server. This is done by the GWT's FormPanel. In particular, FileUpload is only useful when used within a FormPanel, because the browser will only upload files using form submission. Note: 1) You can read about how to code with formpanel and fileupload as answered here @ Basic File upload in GWT 2) If you are concerned with processing the file on client side and not pushing the file to server then you have limited options as mentioned here @ How to retrieve file from GWT FileUpload component? 这篇关于GWT文件上载如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
GWT
file upload works? I know about FileUpload
widget and how to use it. I want to know what is its inner mechanism. We can't get contents of file from FileUpload
widget in client and how it is going to server? I googled it but i didn't get solution.