-
I need to read in a pdf file from an sftp server and embed it in an OBX segment. I had this working fine when I was able to read from a local folder, but it now has to work from an sftp folder and I can't get it to work. The error I get makes no sense to me. Calling code. I get the streamPDF file back but when I call FileUtil.encode(byteArray); it fails
sftp read function:
I get this weird error. I'm assuming it is an error within that FileUtil.encode function as the logger statements after it never execute.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Before I was using this code and it worked when reading from a local folder
Not sure if the byte array I'm sending FileUtil.encode from the sftp reader function is different than the bytearray FileUtil.readBytes returns. |
Beta Was this translation helpful? Give feedback.
-
Thanks. That was hiding the real error which was this line copied from some online code var FileUtil = Packages.com.mirth.connect.server.util.FileUtil; commented that out and it now works. |
Beta Was this translation helpful? Give feedback.
I am not sure it is a weird message
should be: