I have this method signature in jersery servlet. The servlet is reached and the form data is present in the uploadedInputStream object, but the stream does not have http artifacts removed from it. See below.
@POST @Produces("text/plain") @Consumes(MediaType.MULTIPART_FORM_DATA) public String uploadFileIE( @FormDataParam("qqfile") InputStream uploadedInputStream ){ }
When stored in a file, the input stream contains these artifacts surrounding the byte data:
-----------------------------7dc1f42e3005a8 Content-Disposition: form-data; name="qqfile";filename="[filename]" Content-Type: application/octet-stream [bytes from data stream] -----------------------------7dc1f42e3005a8--
Shouldn't these artifacts be deleted at this point? Is there an easy way to remove them without reinventing the wheel?
java jersey file-upload multipartform-data
pclem12
source share