MIGRATE SQL TABLE CONTAINING BASE64 FILES TO AZURE BLOB STORAGE

Hello House, please I need assistance on process flow to migrate data table containing files in base64 formats and text stored in SQL to Azure blob.

Hi @henry_ugorume ,

here’s a small VB script to convert files from base64, where Name is the file name and FileContent is the base64 string.

Dim bytes As Byte()
bytes = Convert.FromBase64String(FileContent)
File.WriteAllBytes(Name, bytes)

After converted you should be able to push the contents to blob storage using Azure activities (I believe is still on preview) or api calls. Sorry, I have no code sample for this specific use case

References:

Convert.ToBase64String Method (System) | Microsoft Docs
Azure Scope (uipath.com)
Copy Blob (uipath.com)
Append to Blob (uipath.com)
Blob Storage REST API - Azure Storage | Microsoft Docs

Thanks for the resources Edwin.
Please I have been able to use Azure Blob API to upload the base64 files, however I do need to retrieve the blob URL from the API uploadresponse.I will appreciate if I can get help in deserializing the codes below, so I can retrieve the url.

soap:Body



</soap:Body>
</soap:Envelope>

I noticed your response code is a SOAP envelope, therefore, it can be deserialized with the deserialize XML activity, it will return a XDocument where you can search for a specific node.

XDocument Class (System.Xml.Linq) | Microsoft Docs

I am afraid your code was removed by the editor, If you still want to share it, please enclose it within code formatting.

image

Thanks Edward for the response, will process this and get back to you

1 Like