-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Hello,
I am trying to pass an inputstream to Param() but i am always getting : "expected 1024 bytes but received 8192".
Here how i am trying to use:
try (InputStream inputStream = fileData.getBody(InputStream.class)) {
String documentId = documentService.compressDocument( owner, titleString, new Origin(OriginType.WIDERSPRUCH, caseId), fileData.getFileName(), fileData.getMediaType().getType() + "/" + fileData.getMediaType().getSubtype(), inputStream, documentType);
return Response.ok(new Success(documentId)).build();
}
Here i am receiving the file as inputPart then i am converting it to inputstream, then i am passing these parameters to convert function like the following : InputStream resultStream = convertService.convert("pdf", "compress", inputStream, filename);