Hi everyone,
I’m hopeful somebody here will have seen this behaviour before and can help me to understand what’s going on. I’m getting an error when trying to decode some Base64 documents that have been read out of a system but I’m not sure why and I’m not sure I can easily create a sample workflow to demonstrate it, as I’ll explain.
The task is to extract specific documents form an API connected to a document management system. I’ve been able to create a workflow that will identify the required document IDs and then extract the documents into feature attributes for me.
The document data that is returned to me is in Base64 format. When I post the output data into an online conversion as a test, it is converted into a usable image (in the case that I tried). From this I assume that all other documents will work similarly.
When I pipe that output into a BinaryDecoder and ask it to decode the Base64 attribute, it throws an error complaining about the input.
When I copy the Base64 code and add it into an AttributeCreator and pipe that into a BinaryDecoder, the process works and generates for me an output that I believe can then be saved to disc as the document in question.
When I open the Base64 fields to examine them, the version that works has obvious LF characters at the end of each line of text. The version that fails (but that was the source for the working example) does not show these characters in the editor.
Please let me know whether I’ve explained this clearly enough. I will try to provide screen shots to illustrate what I’m trying to describe.
Has anyone seen behaviour like this with the BinaryDecoder before and, if so, how did you resolve it?
Many thanks for any thoughts you have that help me understand where this is going wrong.