Notifications
Announcements
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
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
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
Yes, I can see that it works. But I was wondering how that number is arrived at.
It is the relationship between the original size of a binary file and its size when converted to Base64 Text using JSON.
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268