title: How to combine 2 Sinks of a different type?
body: <p>I want to upload file into S3 using Alpakka and at the same time parse it with Tika to obtain its MimeType.</p>
  
  <p>I have 3 parts of graph at the moment:</p>
  
  <pre><code>val fileSource: Source[ByteString, Any] // comes from Akka-HTTP
  val fileUpload: Sink[ByteString, Future[MultipartUploadResult]] // created by S3Client from Alpakka
  val mimeTypeDetection: Sink[ByteString, Future[MediaType.Binary]] // my implementation using Apache Tika
  </code></pre>
  
  <p>I would like to obtain both results at one place, something like:</p>
  
  <pre><code>Future[(MultipartUploadResult, MediaType.Binary)]
  </code></pre>
  
  <p>I have no issue with broadcasting part:</p>
  
  <pre><code>val broadcast = builder.add(Broadcast[ByteString](2))
  
  source ~&gt; broadcast ~&gt; fileUpload
            broadcast ~&gt; mimeTypeDetection
  </code></pre>
  
  <p>However I have a trouble composing Sinks. Methods I found in API and documentation assumes that either combined sinks are of the same type or that I am Zipping Flows, not Sinks.</p>
  
  <p>What is suggested approach in such case?</p>