Hi - has anyone got any experience of using Celigo...
# integrations
s
Hi - has anyone got any experience of using Celigo to download Base64 encoded images and store them? (In this case a DHL parcel label.) I can get the base64 encoded data, but having trouble figuring out how to decode it and store it as an image. All input gratefully received!
t
Hi @Stewart, where are you trying to store them?
s
I was thinking of storing them on an Azure server, or possibly Sharepoint. But open to suggestions!
t
Is the encoded string returned from DHL when you go to request a label?
s
Yes, that’s right. I can copy it into a file and use a service like base64encode to get a pdf. But not too sure how to do that programmatically.
t
Yeah unfortunately we don't currently have a native way to convert an encoded string into a blob that can easily be uploaded into an endpoint as a file. What I've done in the past is use NetSuite as an intermediary because there are suitescript functions that can convert the string to a file in the file cabinet. After doing that, you can pull the file out of file cabinet and move wherever and then delete from file cabinet so you don't use storage there. That help?
s
Thanks - I’ll take a look at that. Do you think it’s best to decrypt the base64 string in Celigo or using Suitescript?
t
You would have to do in suitescript because we don't have a way to convert the string to blob. You can decode the string in IO, but if it's an image then the decoded string isn't any help. Here are some examples of what I've done before:
s
Thanks for the pointers, I was going down a bit of a blind alley
t
basically it's a premap script that calls a suitescript, passes the encoded string, creates a file in the cabinet, then you could have a subsequent step to pull the actual blob file from netsuite and transport it elsewhere
So NetSuite is just a middle man step to convert string to blob