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 / File Size Conversion q...
Power Apps

File Size Conversion question

(0) ShareShare
ReportReport
Posted on by

https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-limit-the-size-of-image-in-add-picture-control-to-less/td-p/483934

 

Text(Len(vImg)*.00000073,"[$-en-US]##.##") & " Mb"

I'm converting a file size to Mb and found the link above.

 

Can someone tell me why we multiply by .00000073?

Thanks

 

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

    Hi @Brianmaric ,

    When an image is stored in Power Apps from (example) a camera control, it is in a format called dataUri which is actually text and the number of characters has a direct relation to the file size.

     

    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.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    154,889 Most Valuable Professional on at

    Hi @Brianmaric ,

    Add an Add picture control to your screen, a Button and a Label

    Upload a file of known size and then put this on the Button (note UploadedImage1 may be different if you have another of these controls already in your app.

    UpdateContext(
     {
     varImage: 
     JSON(
     UploadedImage1.Image,
     JSONFormat.IncludeBinaryData
     )
     }
    )

    and this on the label

    Len(varImage)

    now compare the number in the label with the size of your file

     

    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.

    Visit my blog Practical Power Apps

     

  • CU01050835-0 Profile Picture
    on at

    Yes, I can see that it works.  But I was wondering how that number is arrived at.  

  • WarrenBelz Profile Picture
    154,889 Most Valuable Professional on at

    Hi @Brianmaric ,

    It is the relationship between the original size of a binary file and its size when converted to Base64 Text using JSON.

     

    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.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    154,889 Most Valuable Professional on at

    Hi @Brianmaric ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

    Visit my blog Practical Power Apps

  • Verified answer
    WarrenBelz Profile Picture
    154,889 Most Valuable Professional on at

    Hi @Brianmaric ,

    I am not sure how I can be more specific than It is the relationship between the original size of a binary file and its size when converted to Base64 Text using JSON.

    Obviously someone has done some testing and concluded that this is the relationship factor. 

     

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
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard