I am calling my REST api made using jersey with POST request and I have put my file as a multipart entity
File file=new File(mImageUri.getPath());
MultipartEntity multipartEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
multipartEntity.addPart("image", new FileBody(file));
My code is working when the size of image is relatively small (around less than 1 mb) but is getting failed for larger images.