What would be the return type of java action to convert a file/document to BLOB

0
I am trying to convert file/document to BLOB.   I have created a custom java action but facing issue with the code which otherwise works in a backend service.   Blob attachment = null;             byte[] data = Files.readAllBytes(this.BulkUploadFile);             attachment = new SerialBlob(data);             return attachment;
asked
1 answers
0

You can't return SerialBlob in a Mendix Java Action. If you need the blob contents in a microflow, you should convert the blob to a string and return the string.

 

See an example here

answered