|
From: Raphael S. <rap...@gm...> - 2012-12-17 12:57:39
|
Hi guys,
I have a multipart upload service defined as this:
@POST
@Consumes(MediaTypeExt.MULTIPART_FORM_DATA)
@Produces(MediaTypeExt.TEXT_PLAIN)
public Response postProcesso(final MultipartInput uploadForm) throws
Exception {
And I'm getting the file name:
part.getHeaders().getFirst("Content-Disposition") and the file
content: part.getBody(byte[].class,
null)
The problem is that the file is UTF-8 encoded, but when I get the bytes
from the part body it seems to be converted to another encoding, and I
can't receive the file content properly.
How can I receive a file from multipart post as UTF-8?
Thanks in advance!
|