title: Retrofit upload Base64 string as a Field (8MB) takes 4 minutes
body: <p>I am trying to send the converted file (Base64 - String) as a parameter in POST, the file is about 8 MB, but sending takes about 4 minutes. Is there a way to speed up?</p>
  
  <p>Interface:</p>
  
  <pre><code>@FormUrlEncoded
  @POST("upload")
  Call&lt;Upload&gt; upload(@Field("CONTENT") String content);
  </code></pre>
  
  <p>Retrofit instance:</p>
  
  <pre><code>public class RetrofitClientInstance {
  
  private static Retrofit retrofit;
  private static OkHttpClient client;
  
  public static Retrofit getRetrofitInstance(String url) {
      if (retrofit == null &amp;&amp; !url.isEmpty()) {
          HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
          interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
  
          client = new OkHttpClient.Builder()
                  .addInterceptor(interceptor)
                  .build();
  
          retrofit = new retrofit2.Retrofit.Builder()
                  .baseUrl(url)
                  .client(client)
                  .addConverterFactory(GsonConverterFactory.create())
                  .build();
      }
      return retrofit;
  }}
  </code></pre>
  
  <p>Call:</p>
  
  <pre><code> private void upload(){
      Api api = RetrofitClientInstance.getRetrofitInstance(SharedUtils.SERVER_URL).create(Api.class);
  
      Call&lt;Upload&gt; request = api.upload(getBase64FromFile());
  
      request.enqueue(new Callback&lt;Upload&gt;() {
          @Override
          public void onResponse(Call&lt;Upload&gt; call, Response&lt;Upload&gt; response) {
  
          }
          @Override
          public void onFailure(Call&lt;Upload&gt; call, Throwable t) {
  
          }
      });
  }
  </code></pre>