Goal: Post Image using RestTemplate
Currently using a variation of this
MultiValueMap<String, Object> parts = new
LinkedMultiValueMap<String, Object>();
parts.add("field 1", "value 1");
parts.add("file", new
ClassPathResource("myFile.jpg"));
template.postForLocation("http://example.com/myFileUpload", parts);
Are there any alternatives? Is POSTing a JSON that contains a base64 encoded byte[] array a valid alternative?