-
Oct 31st, 2011, 07:37 AM
#1
Upload large file issue
Hello All,
I am getting issue on posting large file to spring via jersy client..
code I have written for sending file :
client side code: -
Client client = Client.create();
WebResource webResource = client.resource(url);
MultiPart multiPart = new MultiPart();
FileDataBodyPart filePart = new FileDataBodyPart("file", file,
MediaType.APPLICATION_OCTET_STREAM_TYPE);
multiPart.bodyPart("code",code);
client.setChunkedEncodingSize(10000);
webResource.type(MediaType.MULTIPART_FORM_DATA).po st(String.class,
multiPart);
and on the server side i have written something like this:
@RequestMapping(value = "/upload", method = RequestMethod.POST)
public void upload(@RequestParam("file") MultipartFile uploadedFile,
@RequestParam("code") String code,
Writer responseWriter) throws IOException
{
}
when i run client code i am able to get file from uploadedfile param But the value of parameter 'code' ia always be blank .. can anyone tell me how can i retrieve value of other parameters while sending multipart data..
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules