large file uploads with jersey client
866831Oct 28 2011 — edited Oct 28 2011Hello All,
I am getting heap spcace iissue while uploading large files via jersey client , the jvm will run out memory
Can any one help me in understanding how can i send large file about 300mb
via jersy client.
code that i have wriiten is:
WebResource webResource = client.resource(url);
MultiPart multiPart = new MultiPart();
FileDataBodyPart filePart = new FileDataBodyPart("file", file,
MediaType.APPLICATION_OCTET_STREAM_TYPE);
multiPart.bodyPart(filePart);
multiPart.bodyPart(new FormDataBodyPart("code", code));
ClientResponse response = webResource.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,
multiPart);
Thanks