docs: @POST
    @Path("/upload")
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public Response uploadFile(
        @FormDataParam("file") InputStream uploadedInputStream,
        @FormDataParam("file") FormDataContentDisposition fileDetail) {
  
      Config config = createConfig();
  
      if (uploadedInputStream == null) {
        String msg = "input stream is null";
        LOG.error(msg);
        return Response.status(Response.Status.BAD_REQUEST)
            .type(MediaType.APPLICATION_JSON)
            .entity(Utils.createMessage(msg)).build();
      }
      if (fileDetail == null) {
        String msg = "form data content disposition is null";
        LOG.error(msg);
        return Response.status(Response.Status.BAD_REQUEST)
            .type(MediaType.APPLICATION_JSON)
            .entity(Utils.createMessage(msg)).build();
      }
  
      String uploadDir = config.getStringValue(FILE_SYSTEM_DIRECTORY);
  
      final String fileName = UUID.randomUUID() + "-" + fileDetail.getFileName();
  
      final String uploadedFileLocation
          = uploadDir + "/" + fileName;
  
      // save it
      try {
        FileHelper.writeToFile(uploadedInputStream, uploadedFileLocation);
      } catch (IOException e) {
        LOG.error("error uploading file {}", fileDetail.getFileName(), e);
        return Response.serverError()
            .type(MediaType.APPLICATION_JSON)
            .entity(Utils.createMessage(e.getMessage()))
            .build();
      }
  
      String uri = String.format("http://%s:%s/api/v1/file/download/%s",
          getHostNameOrIP(), getPort(), fileName);
  
      return Response.status(Response.Status.OK).entity(uri).build();
    }