use of com.blade.mvc.handler.MultipartHandler in project blade by biezhi.
the class ServletRequest method init.
public void init() throws IOException, MultipartException {
// retrieve multipart/form-data parameters
if (Multipart.isMultipartContent(request)) {
Multipart multipart = new Multipart();
multipart.parse(request, new MultipartHandler() {
@Override
public void handleFormItem(String name, String value) {
queryParams.put(name, value);
}
@Override
public void handleFileItem(String name, FileItem fileItem) {
fileItems.put(name, fileItem);
}
});
}
}
Aggregations