Hi Vinod,
it depends on how you want to design the resource on the server side.
It could look like this:
@Path("image/{id}")
@PUT @Consumes("image/jpeg")
public void putImage(@PathParam("id") String imgId, File imgFile) {
// process the image file here, Jersey will give you a temporary file
handler in imgFile
}
The client side could then be like follows:
File imgFile = ...;
String imgId = ...;
webResource.path("image").path(imgId).type("image/jpeg").put(imgFile);
~Jakub
On 07/08/2011 11:50 AM, sreepathivinod wrote:
> Hi all,
>
> Thanks in advance,
>
> I want to upload an image to server using jersey server. And i want to
> test(upload an image) through jersey client..
>
> Can any one help me plz
>
> Thanks
> Vinod..
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/How-to-Upload-an-image-using-jersey-client-tp6561930p6561930.html
> Sent from the Jersey mailing list archive at Nabble.com.
>