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 / Urgent. Images uploade...
Power Apps
Answered

Urgent. Images uploaded using power apps mobile app is shown as corrupted inside SharePoint

(2) ShareShare
ReportReport
Posted on by 1,875 Season of Giving Solutions 2025
I have the following code, which capture the uploaded image inside a power apps canvas screen and call a power automate flow to populated the image:-
 
PopulateWorkOrderPictures.Run(
                "Spare Parts",
                varWorkOrder.'Work Order Type'.Value,
                TextInput1.Text,
                varWorkOrder.ID,
                Value(varProcessID),
                If(
                    IsBlank(varWorkOrder.Brand),
                    "None",
                    varWorkOrder.Brand
                ),
                If(
                    IsBlank(varWorkOrder.'Sequence Number'),
                    "None",
                    varWorkOrder.'Sequence Number'
                ),
                varnewWOSPD.ID,
                If(
                    IsBlank(varWorkOrder.'Network Name'),
                    "none",
                    varWorkOrder.'Network Name'
                ),
                {
                    file: {
                        contentBytes: UploadedImage_1_2.Image,
                        name: AddMediaButton_1_2.FileName
                    }
                }
            ).response
 
 
here is the workflow parameters:-
 
 
 
and the action to create the picture:-
 
 
 
 
now everything was working well for more then 2 years, on power apps web browser and power apps mobile application, but yesterday, i made some modifications to the power apps (not related to this process), and we have noted that any image uploaded from mobile apps either using "Take Photo" or "Photo Library" will be shown as corrupted inside SharePoint:-
 
 
 
and the file size will only be "56 bytes", unlike the images uploaded from power apps web browser, which will be 22 KB and more, as follow:-
 
 
 
Also the bytes send from power apps to power automate will be as follow incase of using mobile power apps:-
 
 
L1Nlc3Npb25TdG9yYWdlLzM3QjExRTU0LTI2Q0UtNDVFNi1BQTQ3LUU2N0I4MzU1MTYzOC5qcGc=
 
 
while the bytes will be much longer for a valid image.. any advice please on this? as it is happening on our prod app as well..
 
Thanks
 
 
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    You are converting the output from Base64 in the Compose action in the flow, but not sending Base64 (you have no JSON conversion in the app run code).
    Prior to the Power Apps V2 trigger, you needed to convert the file content to Base64 with JSON then re-convert to an image in the Flow (with the Compose you have).
    Now you need neither - simply use the content of the parameter sent triggerBody()['file']['contentBytes'] as the file image (you can delete the Compose action)
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • johnjohnPter Profile Picture
    1,875 Season of Giving Solutions 2025 on at
     
    Thanks for the reply, as i mentioned my code is working well on web browser and was working on mobile app so it is not totally wrong.. now i fix this by doing the following:-
     
    file: {
                            contentBytes: Substitute(JSON(UploadedImage_1.Image, JSONFormat.IncludeBinaryData),"""", ""),
                            name: AddMediaButton_1.FileName
    }
     
     
    seems "UploadedImage_1_2.Image" no longer send the binary of the image on mobile apps, unless we explicitly mentioned this as in my modified formula
     
     
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    I am surprised it was working at all, but to be honest I dropped the base64 conversions on both ends as soon as the PowerAppsV2 trigger was working properly. It is far simpler to send the PDF image and then use the contentBytes directly as the destination file content.
  • johnjohnPter Profile Picture
    1,875 Season of Giving Solutions 2025 on at
    and what do you think about the fix i applied?
     
     
     
    file: {
     
                            contentBytes: Substitute(JSON(UploadedImage_1.Image, JSONFormat.IncludeBinaryData),"""", ""),
     
                            name: AddMediaButton_1.FileName
     
    }
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    I wrote a blog on this some years back before the Power Apps V2 control was implemented. The JSON conversion you are using is only stripping out the leading and trailing quotes - you actually should be taking out the header and leaving only the "raw" image content as per the code in the link above.
    But as I mentioned, this process has been redundant for some time due to the introduction of the Power Apps V2 trigger, which can directly accept and pass on an image file content.
  • johnjohnPter Profile Picture
    1,875 Season of Giving Solutions 2025 on at
     
    But in my case i need to do the JSON conversion and explicitly define "JSONFormat.IncludeBinaryData" , otherwise the bytes will not be sent from the mobile app.. now i am passing the  file to the flow which accept a file content as a parameter.. things are working now on both web browser and mobile apps for all users.. so what i am missing ?
     
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    I have been using the raw image without JSON at either end on mobile apps for a couple of years, dealing with thousands of photos taken in the field. If what you have is working then great, but you posted an urgent request and I provided what I know is a viable solution.
  • luuminhvuong93 Profile Picture
    300 on at
    I am having the same issue. But I already used v2 many years, and did not need the base64 conversion part in my code. Now for some reasons it only worked on PC upload image, but not from the app in mobile phone. 
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    Mine is still working fine on iPads on a number of different apps filing hundreds of photos weekly. Do you have the New Analysis Engine turned on - if so try with it off.
  • johnjohnPter Profile Picture
    1,875 Season of Giving Solutions 2025 on at
    try to use includebinarydata, as follow:-
     
    file: {
     
                            contentBytes: Substitute(JSON(UploadedImage_1.Image, JSONFormat.IncludeBinaryData),"""", ""),
     
                            name: AddMediaButton_1.FileName
     
    }
     
    this fixed the issue at my end

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard