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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Getting contentBytes s...
Power Apps
Answered

Getting contentBytes string from attachments

(0) ShareShare
ReportReport
Posted on by 225

HI

I am currently trying to figure out on how to send 'bigger' files to Power Automate from within an Attachment Control (Or a Canvas App in general)

 

When i look at files in the attachment control in Power Apps, and I try to get the contentBytes Value, I get the following result;

 

So I do the following action;

NativeNass__0-1709221665775.png

 

appres://blobmanager/a721116b7ba54d5e982f5c1aa90387e8/1


However, when I pick up the file using flow, I get the following contentBytes value;

NativeNass__1-1709221752152.png

Which is the actual string that I want to work with so I can try to pass on bigger files to Power Automate and convert into a file afterwards.

Does anybody has any feedback on this?

Thanks!




Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,281 Most Valuable Professional on at

    Hi @NativeNass_ ,

    One trick is to add an Image Control (you can hide it) referencing the attachment (example)

    Last(AttachmentControl.Attachments).Value

    You can then send the Image property of this.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • NativeNass_ Profile Picture
    225 on at

    Hi @WarrenBelz 

     

    Thanks for your reply, however;

    This doesn't seem to work for all possible file extensions?

    NativeNass__0-1709279424570.png

    NativeNass__1-1709279467798.png

     

    Unless I misunderstood you?

  • WarrenBelz Profile Picture
    155,281 Most Valuable Professional on at

    @NativeNass_ ,

    That way will work on most file types, however I answered while mobile without a lot of thought on a better process. Using the Power Apps V2 connector, you can send the straight .Value to the Flow as the contentBytes - Flow Parameter is

    {
     file: 
     {
     contentBytes: First(acName.Attachments).Value,
     name: First(acName.Attachments).Name
     }
    }

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • NativeNass_ Profile Picture
    225 on at

    Hi @WarrenBelz 

     

    Yes I have created a solution like this that works, however when we start to work with larger files, the browser (and the canvas app) crashes.

     

    I want to put files in Blob, but when working with files up to 100MB it's also faster to use the Blob Connector. This however does not solve the use case for files larger then 100MB.

     

    I was hoping to create a solution where we can handle files that are larger then 100MB, by working with the Base64 string and passing this as a text value to flow, and reconvert this to an actual file within flow.

     

    But this does not seem to work 😕

     

    Do you have anymore thoughts on this?

     

    The 100MB file limit is a big showstopper within Canvas Apps, since the documentation of the Azure Blob Connector says that it can handle files up to 1 GB, but this is within flow only i think (with chuncking enabled).

     

    My big issue is that i cannot seem to get the file content into flow from my canvas app and I need to be able to let users upload files (as big as possible).

     

    Thanks already

  • NativeNass_ Profile Picture
    225 on at

    @WarrenBelz 

     

    I came across a blog of yours while trying to figure out the attachment size and apparently this seems to work to get the Base64 string also in a text label.

    Show size of attachment or uploaded file – Practical Power Apps

     

    It is now shown in the varJSON parameter.

     

    Strange that now it does work and not before 🙂

     

    However this does freak out again when working with larger files 🙂


    As far as I know, the only valid option is to keep the files under a specific amount of MB..

     

    Everything just starts to crash.

  • WarrenBelz Profile Picture
    155,281 Most Valuable Professional on at

    Hi @NativeNass_ ,

    My understanding is that 100mb is the maximum and yes you would need to keep the file under this.

  • NativeNass_ Profile Picture
    225 on at

    @WarrenBelz 

     

    As i feared 🙂

    When using a document library in SharePoint Online to handle the 'big' files. 

    However, when we put a power automate trigger there we get the same issue;

    Http request failed as there is an error: 'Cannot write more bytes to the buffer than the configured maximum buffer size: 104857600.'.

    Again 100 MB, and we would try to get the files into Blob.

    Any ways by chance in your experience around this?
    Seems like a pretty big limitation when we want end users to store files in blob.

    Thanks !

  • WarrenBelz Profile Picture
    155,281 Most Valuable Professional on at

    @NativeNass_ ,

    I keep my users to 50mb and anything over (which is rare) they file directly in SharePoint then update the metadata there, so I am not much help here.

  • Verified answer
    NativeNass_ Profile Picture
    225 on at

    Hi @WarrenBelz 

     

    Well we needed to upload to blob, but saving on an SPO location is no issue.
    I've built a PowerShell script that runs within an Azure Automation runbook, which is triggered from Power Automate.

    So I fetch the file on SPO and copy it to Blob like that, that way I can handle files up to 1GB by storing it in the temporary storage from Azure Automation when I do the copy job.

    Seems to work fine 😃

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 955

#2
11manish Profile Picture

11manish 652

#3
Valantis Profile Picture

Valantis 626

Last 30 days Overall leaderboard