I'm hoping someone can help or provide info, We have an Appian process

I'm hoping someone can help or provide info,
We have an Appian process setup as a web service, which is receiving information from an external system. When sending documents the external system is converting the document to Base64string.
I've added the Base64Utilities plug in and am trying to convert the base 64 string back to a file. This file could be a jpg, xls, xlsx, pdf, doc, docx etc, type of file.. for the example or the test i used a jpg.

I am wondering when configuring the "Appian Document from Base64String" smart node if there is a way to identify the original document name, extensions, etc (all the required fields that are inputs for this smart node)?

Second, I'm wondering if there is documentation out there on how to use the smart service properly, I tried to simply specify the name, extension and folder, then pass the base 64 string into the body and though it is creating the document it's a broken image that won't open, and i notice the ...

OriginalPostID-113562

OriginalPostID-113562

  Discussion posts and replies are publicly visible

  • ...original image is 140 K where as the one that is saved to Documents in Appian is 139.42 K.

    Thoughts?
    Thanks for any help...
  • a) You'll have to get the extension information from the original service, if you don't know it at design-time. Perhaps the system can send that metadata as additional process variables.
    b) As to why your specific case isn't working -- have you gotten it working with any documents, is this one in particular not working, etc? A good way to test your configuration is to upload a document to Appian, use the convertdocumenttobase64() function to get a Base 64 string, and then pass that pack into the Appian Document from Base64 Smart Service. Also, for a very small document, you can verify that the output of convertdocumenttobase64() matches the string received from your web service.
  • Thanks Lizzie, I found the issue thanks to your information. If i have Appian translate to base64 then back it works, so the issue is before Appian receives the string. The file is coming from an InfoPath form attachment. Infopath adds a header to the base 64 string that contains the file name and the extension and identifies the string as an InfoPath attachment. I will need to extract this information and translate to get the file name and extension, then pass the remaining information through the node to convert it back to a file. Because this will be of variable length I'm going to check to see if there is a way to have it done before being passed to Appian.
    Thanks again for the help...
  • Ok glad you figured out the issue. It sounds like your proposed approach will work; but also depending on if the header is a consistent format, you might be able to parse it out in Appian without too much trouble. Check out Text Functions e.g. extract, search, etc.