docs: public void putObject(String bucketName, String objectName, ServerSideEncryption sse, String fileName)
            throws InvalidBucketNameException, NoSuchAlgorithmException, IOException,
            InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
            InternalException, InvalidArgumentException, InsufficientDataException {
  
      if (sse.getType() == ServerSideEncryption.Type.SSE_C && !this.baseUrl.isHttps()) {
        throw new InvalidArgumentException("SSE_C operations must be performed over a secure connection.");
      } else if (sse.getType() == ServerSideEncryption.Type.SSE_KMS && !this.baseUrl.isHttps()) {
        throw new InvalidArgumentException("SSE_KMS operations must be performed over a secure connection.");
      }
  
      if (fileName == null || "".equals(fileName)) {
        throw new InvalidArgumentException("empty file name is not allowed");
      }
      Path filePath = Paths.get(fileName);
      if (!Files.isRegularFile(filePath)) {
        throw new InvalidArgumentException("'" + fileName + "': not a regular file");
      }
  
      String contentType = Files.probeContentType(filePath);
      long size = Files.size(filePath);
  
      RandomAccessFile file = new RandomAccessFile(filePath.toFile(), "r");
  
      // Set the contentType
      Map<String, String> headerMap = new HashMap<>();
      headerMap.put("Content-Type", contentType);
  
      try {
        putObject(bucketName, objectName, size, file, headerMap, sse);
      } finally {
        file.close();
      }
  
    }