title: Android Retrofit : TypedByteArray instead of TypedFile is not working.
body: <p>I am using a multi-part request(POST) to send 3 images to the server. My method definition is below </p>
  
  <pre><code>@Multipart
  @POST("/" + ENDPOINT_POST_PICTURE_SET)
  SendPictureSetResponse sendPictureSet(@Part("image_1") TypedFile photo1, 
  @Part("image_2") TypedFile photo2, @Part("image_3") TypedFile photo3,
  @Part("string1") TypedString string1, @Part("string2") TypedString string2);
  </code></pre>
  
  <p>I have decided to compress these jpeg images to maybe 90% quality(maybe even 70%) before I attach them.</p>
  
  <pre><code>Bitmap bitmap = BitmapFactory.decodeFile(application.getImageFilePaths().get(0));
          ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
          bitmap.compress(Bitmap.CompressFormat.JPEG, 90, byteArrayOutputStream);
  </code></pre>
  
  <p>I updated the method to take in three TypedByteArrays instead using the following code. </p>
  
  <pre><code>@Multipart
  @POST("/" + ENDPOINT_POST_PICTURE_SET)
  SendPictureSetResponse sendPictureSet(@Part("image_1") TypedByteArray photo1, 
  @Part("image_2") TypedByteArray photo2, @Part("image_3") TypedByteArray photo3,
  @Part("string1") TypedString string1, @Part("string2") TypedString string2);
  </code></pre>
  
  <p>I create the bytearrays as shown below and passed it to the method .</p>
  
  <pre><code>byteArrayOutputStream.toByteArray()
  </code></pre>
  
  <p>The server however does not recognize this format. What changes do I need to make in my request(or/and in the server) for the server to accept this request format. Do I need to add a different mime type or header or is my request in it's entirety wrong? I am only adding an authorization header(token) for now, using a request interceptor. </p>