File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
engine/src/main/java/io/seldon/engine/api/rest Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 16
16
package io .seldon .engine .api .rest ;
17
17
18
18
import com .fasterxml .jackson .databind .ObjectMapper ;
19
+ import com .google .protobuf .ByteString ;
19
20
import com .google .protobuf .InvalidProtocolBufferException ;
20
21
import io .micrometer .core .annotation .Timed ;
21
22
import io .opentracing .Span ;
@@ -175,7 +176,7 @@ public ResponseEntity<String> predictions_binary(RequestEntity<InputStream> requ
175
176
try {
176
177
ObjectMapper mapper = new ObjectMapper ();
177
178
Map <String , Object > protoBody = new HashMap <String , Object >() {{
178
- put ("binData" , toByteArray (requestEntity .getBody ()));
179
+ put ("binData" , ByteString . copyFrom ( toByteArray (requestEntity .getBody () )));
179
180
}};
180
181
return _predictions (mapper .writeValueAsString (protoBody ));
181
182
} catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments