code: public static boolean isMultipart(HttpServletRequest request) {
  		if (!"post".equals(request.getMethod().toLowerCase())) {
  			return false;
  		}
  		String contentType = request.getContentType();
  		return contentType != null && contentType.toLowerCase().startsWith("multipart/");
  	}
docs: Checks if the request is a multipart request
  
  @param request the HTTP servlet request
  @return true if request is a Multipart request (file upload)