I am building an automation using an API to call a 3rd party website and collect all cases on the website for a certain time frame, including the logo for each case. The logo is obtained through a separate endpoint which returns a base64 string in JSON format like the text below, it is then stored in a row on a data table.:
For my process I need to convert this string to an image and then upload it to a SharePoint site. To do this I have created a process as follows:
In this instance the logoBase64 variable is of type string, logoConverted is of type byte array (Byte) and logoImageFile is type UiPath.Core.Image. The first assign gets the string from the appropriate column & row on the results data table, then i assign convert.fromBase64(logoBase64) to the logoConverted variable, then assign New UiPath.Core.Image(logoConverted) to the logoImageFile variable.
Admittedly my understanding of the convertFromBase64 method is not great and this is my first time working with base64, I’ve tried looking at other ways of invoking code but using assigns seems to be how others have done this on this forum, I am looking to see what I need to do to get the image output which I can then upload to SP using a onedrive/sharepoint activity scope. Any help would be appreciated with this.