Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ZLWZe5o/PIfRIVdCdeRcFD
Power Apps - Building Power Apps
Unanswered

How to download Base64 file type in canvas app

Like (0) ShareShare
ReportReport
Posted on 28 Mar 2022 11:52:41 by 1

Hello All,

I'm developing a app which has a functionality of downloading any file chosen.

But I'm Facing issue with download function on Mobile as well as on tablet (I do have a launch function which is working but I want to use it has a backup).

So I'm trying to get something out of Base64 String.

So I'm getting base64 string of any file type, So my question is How to Download a file having it's Base64 string?

 

Best Regards

Categories:
  • Joseff Profile Picture
    37 on 08 Aug 2023 at 14:53:13
    Re: How to download Base64 file type in canvas app

    I was looking for an answer to this and couldn't find anything.

    After messing around in PowerApps a bit it turns out if you create an attachment control and set the items similar to below it will download straight from the control:

     

    [{DisplayName:"data.svg",Id:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDQ4IDIwNDgiPjxwYXRoIGQ9Ik0xNjY0IDE1MzJsMTI4LTEyOHY2NDRIMTI4VjBoMTExNWw0OTkgNDk5cS0zNSAxMS02MCAyM3QtNDggMjgtNDIgMzYtNDQgNDRsLTEwIDEwaC0zODZWMTI4SDI1NnYxNzkyaDE0MDh2LTM4OHpNMTI4MCA1MTJoMjkzbC0yOTMtMjkzdjI5M3ptNTY4IDEyOHE0MiAwIDc4IDE1dDY0IDQyIDQyIDYzIDE2IDc4cTAgMzktMTUgNzZ0LTQzIDY1bC03MTcgNzE5cS03IDItMzcgOXQtNzEgMTgtODkgMjItODYgMjItNjYgMTYtMjggN0gzODR2LTEyOGg1NDRsNjItMjQ5IDcxNy03MThxMjgtMjggNjUtNDJ0NzYtMTV6bTUxIDI0OXEyMS0yMSAyMS01MSAwLTMxLTIwLTUwdC01Mi0yMHEtMTQgMC0yNyA0dC0yMyAxNWwtNjkyIDY5NC0zNCAxMzUgMTM1LTM0IDY5Mi02OTN6IiBmaWxsPSIjMzMzMzMzIj48L3BhdGg+PC9zdmc+"}]
     
    Joseff_1-1691506472922.png

     

     
    Joseff_0-1691506384026.png

     

    Edit:
    After looking at this and using it a little more one thing to be aware of is the Name and Value in the controls advanced settings:

    Joseff_0-1691512591556.png

    I found that mine kept defaulting the Value back to DisplayName which wont work so you just need to make sure these are set correctly

  • v-jefferni Profile Picture
    on 30 Mar 2022 at 09:24:11
    Re: How to download Base64 file type in canvas app

    Hi @Abhishek_Shinde ,

     

    You need to generate an actual file somewhere, like in OneDrive or SharePoint library, then you will be able to use Download() function. The Download function only accepts URLs as input parameter.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

Overall leaderboard
Loading started