code: private String getIdFromFilename(String filename) {
          if (!StringUtils.hasText(filename) || filename.indexOf('_') < 0) {
              return null;
          }
          return filename.substring(0, filename.lastIndexOf('_'));
      }
docs: Extract the session id from the filename.
  
  @param filename the name of the file to use
  @return the session id