I have a web service call through which zip files can be uploaded. The files are then forwarded to another service for storage, unzipping, etc. For now the file is stored on
The only part of @artbristol's answer you really need is this (which you can set up as a RestTemplate Spring bean):
final RestTemplate restTemplate = new RestTemplate();
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
requestFactory.setBufferRequestBody(false);
restTemplate.setRequestFactory(requestFactory);
After that, I think just using a FileSystemResource as your request body will do the right thing.
I've also used an InputStreamResource successfully this way, for cases where you already have the data as an InputStream and don't need to consume it multiple times.
In my case, we had gzipped our files and wrapped a GZipInputStream in an InputStreamResource.