Abraham Gnanasingh
Abraham Gnanasingh

Reputation: 897

Receive Multipart FormData - Jersey 1.19.1 REST

I am sending multipart/form-data request but I am unable to get FormData values in Jersey 1.19.1 as @FormDataParam is not available. I am trying with the following code but I got strucked. Is there a way to resolve it in this Jersey version?

@POST
@Path("/uploadfile")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
public String uploadFile(@Context HttpContext hc) {
   HttpRequestContext request = hc.getRequest();

   return null;
}

Thanks in advance.

Upvotes: 1

Views: 3149

Answers (1)

Related Questions