我看过服务器端上传代码示例......它说接下来......
...
/**
* Get the content of an uploaded file.
*/
@Override
public void getUploadedFile(HttpServletRequest request, HttpServletResponse response) throws IOException {
String fieldName = request.getParameter(UConsts.PARAM_SHOW);
File f = receivedFiles.get(fieldName);
if (f != null) {
response.setContentType(receivedContentTypes.get(fieldName));
FileInputStream is = new FileInputStream(f);
copyFromInputStreamToOutputStream(is, response.getOutputStream());
} else {
renderXmlResponse(request, response, XML_ERROR_ITEM_NOT_FOUND);
}
}
...
...好吧,正如我所见,要获取文件片段使用File对象。但是,我记得,GAE 不支持 File io 对象。所以我的问题是这个库可以用于 GAE 文件上传,还是有一些更适合 GWT 的库?
谢谢