code: public static boolean isMultipartContent(HttpServletRequest request) {
  		if (!"post".equals(request.getMethod().toLowerCase())) {
  			return false;
  		}
  
  		String contentType = request.getContentType();
  		if (contentType == null) {
  			return false;
  		}
  		if (contentType.toLowerCase().startsWith(MULTIPART)) {
  			return true;
  		}
  
  		return false;
  	}
docs: Tells if a request is multipart or not.
  
  @param request the javax.servlet.http.HttpServletRequest that we are going to check.
  
  @return true if the request is multipart, false otherwise.