code: public static boolean isFormMultipartPost(HttpServletRequest request) {
          if (!isHttpPostRequest(request)) {
              return false;
          }
  
          String contentType = request.getContentType();
          if (contentType == null) {
              return false;
          }
  
          if (contentType.toLowerCase().startsWith("multipart/form-data")) {
              return true;
          }
  
          return false;
      }
docs: Check if provided {@link HttpServletRequest} is a FormMultipartPost
  
  @param request {@link HttpServletRequest} to check
  @return true if FormMultipartPost, false otherwise