Sure, just use Attachment as an input parameter, instead of MultipartMap, and
you'll be able to get to the input stream from there.
As I said earlier on, the support of multipart/form-data is a bit limited in that no delegation to custom providers occur but it
will be enhanced a bit later on.
List<String> content = formData.get("content");
you can also do, if no multiple values is expected
String str = formData.getFirst("content")
cheers, Sergey
This works, but is there an equivalent that allows me to read the
attachment as a stream instead of having it entirely turned into a string?
@POST
@Path("/gazetteer/{id}/replace-contents/{type}")
@Consumes("multipart/form-data")
public Response takeGazetteerContents(@PathParam("id") String id,
@PathParam("type") String type,
MultivaluedMap<String, String>
formData) {
List<String> content = formData.get("content");
return null;
}