code: protected String createFormFieldName(BinaryAttachment binaryAttachment) {
      if (binaryAttachment.getFieldName() != null) {
        return binaryAttachment.getFieldName();
      }
  
      String name = binaryAttachment.getFilename();
      int fileExtensionIndex = name.lastIndexOf('.');
      return fileExtensionIndex > 0 ? name.substring(0, fileExtensionIndex) : name;
    }
docs: Creates the form field name for the binary attachment filename by stripping off the file extension - for example,
  the filename "test.png" would return "test".
  
  @param binaryAttachment
  The binary attachment for which to create the form field name.
  @return The form field name for the given binary attachment.