code: public InputFile setMedia(InputStream mediaStream, String fileName) {
          this.newMediaStream = mediaStream;
          this.mediaName = fileName;
          this.attachName = "attach://" + fileName;
          this.isNew = true;
          return this;
      }
docs: Use this setter to send new file as stream.
  @param mediaStream File to send
  @param fileName Name of the file
  @return This object