How to retrieve file from GWT FileUpload component?

后端 未结 3 2040
[愿得一人]
[愿得一人] 2020-12-09 23:52

I want to upload a file using GWT fileUploader component,

I tried like this,

FileUpload fileUpload = new FileUpload();
filepload.addChangeHandler(ne         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-10 00:12

    1. You cannot get an absolute path of a file on a user's device from a GWT FileUpload widget.

    2. You do not need an absolute path of a file to upload it, and store it as a byte array.

    GWT documentation provides an example of how to use the Upload File widget:

    http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/FileUpload.html

提交回复
热议问题