title: Upload 2GB file with Apache HttpClient
body: <p>I'm new to Apache HC and I'm wondering what is the best way to upload files of about 1 or 2 GB size.</p>
  
  <p>I am using the Minio SDK to retrieve a presigned url from the server. After that, I am sending this presigned url to the client that will upload the specified file.</p>
  
  <p>From Minio side, the max size per put operation is 5GiB so there should be no problems from minio side. My main concern is:</p>
  
  <p>What would be the best way to achieve the upload of the file from Apache HC in order to get the best performance / less error prone behaviour?</p>
  
  <p>I'm guessing that directly uploading a 2GB file is not a good option. Does the Apache HttpClient handles that upload in case an error occur? Is it convenient to upload the file as parts? How do I achieve that?</p>