The canvas JSON function added last year will base64 encode images and media. We don't have a way to convert other data types to binary, to then be base64 encoded; if there is more need here please tell us more about your scenarios.
Any solutions at moment? API calls?
Please support this function!
@CarlosG Can you please share some more information?Can I have the Base64 string of an image in Powerapps?Right now we can use a custom connector and the image is sent to the database as a Base64 string. Is it possible to have the string in Powerapps before we sent it to the database?I don't understand what you mean byTextForm = Binary.ToText(Text.ToBinary("Password"), BinaryEncoding.Base64)Thank you in advance 🙂
You can use Flow to handle Base64 conversions.
Basically the steps are to create a Flow that will accept a Data URI as a parameter, and convert it to Base64 like this:
and in your Canvas app, call the Flow and pass the content as a url encoded parameter - here is an example of taking a photo from a collection and passing it into a Flow:
'PowerApp->Createanewrecord'.Run(First(photo).Url , BrowseGallery1.Selected.Case)
then you can return your base64 value this way:
I just wrote a blog on taking pictures using a Canvas app and storing the pictures in Dynamics CE (aka CRM) as Notes using Base64 encoding: https://eccosystem.blogspot.com/2018/11/capture-pictures-to-dynamics-customer.html