sending a document to a rest web-api in base64 chunks

Hi all,

I am trying to write a Process Model in Appian which uses an interface to accept a document from the user [of any size] and then feed that document to our document management system using its REST web-api.

The document management system provides a web-api which allows you to call a method to create a document, and this call will return a document id. You can then subsequently send chunks of the document using that document id as a base64 string.

So, what I have done so far is to develop an interface which successfully accepts documents from the user and stores them into an appian folder.

Now what I need to do is get those documents and convert them into a base64 string and then send them a chunk at a time to the web-api provided by our document management system.

Can anyone advise how I would do this using a process model?

thanks heaps,

David.

  Discussion posts and replies are publicly visible

Parents
  • Hi,

    This can be achieved using a simple function ConvertDocumentToBase64() which is a part of 'Base64 Document Conversion Functions' plug-in. It a plugin provided by Appian itself. This function takes the document as input and converts it into base64 string. Then after that you can create batches of the string by counting the length and dividing it in equal parts and then sending it to the destination either with MNI or creating a loop in Process model.

    OR

    You can directly select content type as 'Multipart From Data' in an integration and then select type as document. Now specify the file name and document and you're done. Refer the screenshot below.

    -Harshit.

  • Thanks Harshit,  Do you have a URL where this plugin can be located?  I've been searching in Appian community site and have not been able to locate it.  thanks, David.

Reply Children