web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Convert Base64 URL IMG...
Power Apps
Unanswered

Convert Base64 URL IMG to Store in Library

(0) ShareShare
ReportReport
Posted on by 64

Hi all! I'm from Brazil and I need a lot of help

 

I'm trying to convert an image I'm using in my application to the image control that comes straight from a URL. However when trying to extract the binary data from it and send it to a flow that composes the binary data and saves it in jpg in my library I noticed the error that the JSON () function is not able to convert. I also tried to generate HTML with this link but without success.

Propery Image in my Image1
"https://barcode.tec-it.com/barcode.ashx?data="&TextInput1.Text&"&code=QRCode&multiplebarcodes=false&translate-esc=false&unit=Fit&dpi=96&imagetype=Gif&rotation=0&color=%23000000&bgcolor=%23ffffff&codepage=Default&qunit=Mm&quiet=0&eclevel=L"

where TextInput1.Text is an entry for the user to generate a website's QR Code.

 

After that I store the QR codes inside a collection to call my flow and send it to the library in the SPO

Collect(
col_Imagens;
{
Name: TextInput1.Text,
Value: Substitute(
JSON(
Image1.Image,
JSONFormat.IncludeBinaryData
),
Char(34),
"")})

and finally I call the flow on the send button
'CriarArquivo-Item'.Run(JSON(col_Imagens,JSONFormat.IncludeBinaryData), 1)

attached I put the images of both the power apps and the error of my flow

Error message: It was not possible to process the model's language expressions in the action's' Compose 'entries in line' 1 'and in the' 12454 'column:' The model language function 'dataUriToBinary' expects its parameter to be formatted as a valid data URI. The value provided 'https://barcode.tec-it.com/barcode.ashx?data=Test1&code=QRCode&multiplebarcodes=false&translate-esc=false&unit=Fit&dpi=96&imagetype=Gif&rotation=0&color=%23000000&bgcolor=%23quffiet&mcodepage 0 & eclevel = L 'was not formatted correctly. Check usage details at https://aka.ms/logicexpressions#dataUriToBinary. '.

 

 
Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Danilo-ES-BR :

    Do you want to save a picture URL as a picture format file and store this file in the SharePoint library?

    If so, this is easy to implement, you don’t even need to convert it to JSON. The ‘Up date file from URL’ action in Flow can directly convert URLs to files. I've made a test for your reference:

    1\The pic

    1.JPG

    2\My flow(DaniloFlow)

    2.JPG

    The formula

    DaniloFlow.Run(Image1.Image)

    The Rusult:

    7.gif

    Best Regards,

    Bof

  • Danilo-ES-BR Profile Picture
    64 on at

    Ty!!! 😄

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard