title: upload file in vertx and convert it into byte array to insert in database
body: <p>I need to write upload file code using vertx and then save it into PostgreSQL table. but as file is uploaded in multipart and asynchronously I am unable to get byte complete array.  Following is my code</p>
  
  <pre><code>public static void uploadLogo(RoutingContext routingContext) {
      HttpServerRequest request = routingContext.request();
      HttpServerResponse response = routingContext.response();
      request.setExpectMultipart(true);
      request.uploadHandler(upload -&gt; {
          upload.handler(chunk -&gt; {
              byte[] fileBytes = chunk.getBytes();
          });
          upload.endHandler(endHandler -&gt; {
              System.out.println("uploaded successfully");
          });
          upload.exceptionHandler(cause -&gt; {
              request.response().setChunked(true).end("Upload failed");
          });
      });
  }
  </code></pre>
  
  <p>Here I get byte array in <code>fileBytes</code> but only part at a time. I dont understand how to add next byte array to it as it works asynchronously. Is there any way to get byte array of entire file </p>