code: private String getContentType(List<FileItem> items) {
          for (FileItem i : items) {
              if (!i.isFormField() && i.getFieldName().equals(CONTENT_PARAMETER)) {
                  return i.getContentType();
              }
          }
          return null;
      }
docs: Determines content-type of the uploaded file.
  
  @param items
  @return the content type