public void doFilter(ResourceRequest request, ResourceResponse response, FilterChain chain) throws IOException,
PortletException {
if (!wrapMultipartRequests && PortletFilterUtil.isMultipartRequest(request)) {
chain.doFilter(request, response);
} else {
chain.doFilter(new HttpServletResourceRequestWrapper(request), new HttpServletResourceResponseWrapper(response));
}
}