cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to convert Base64 Text in a SharePoint List

Hi all, I have images (taken from the camera) from Power Apps and stored in a SharePoint Online list, as Base64 Text (in multiline text field).
The users would like to view/download these from SharePoint (they can view the image fine in Power Apps) and I am unsure how to achieve this.
It was suggested I would need a flow to convert this, but I am unsure how to do this.
Any help would be appreciated

10 REPLIES 10
PrasadAthalye
Community Champion
Community Champion

You can use Create file option and may be send it via email given in below thread...

 

https://powerusers.microsoft.com/t5/Building-Flows/Get-File-Content-as-Base64/td-p/73919

 

OR Save the file back to Document library and send a link to that doc library file..

 

Like and Mark this as answer if it resolves your issue

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
Anonymous
Not applicable

HI @PrasadAthalye 

 

I've seen that post and attempted it prior to posting my question, for whatever reason it is not working for me, please see screenshot of my flow and then another screenshot of the error.

 

CreateImageFail.JPG

CreateImageFail2.JPGCreateImageFail1.JPG

 

any ideas why its not working for me please?

 

@Anonymous Can you directly use Create file to create JPG? In the filename give the name as .JPG and remove convert file action?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
Anonymous
Not applicable

@PrasadAthalye 

I've tried that and the step does not fail, but when I go to open the file created in OneDrive it states:

 

G99_0-1600848776070.png

If i download it I get:

G99_1-1600848800646.png

Suggesting to me the creating of the file isn't working correctly?



@Anonymous - Can you check Base64 string if it mentions the file type? I think it might be .png OR .JPEG... Try one of these...

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
Anonymous
Not applicable

Hi @PrasadAthalye 

 

I've checked the base64 string in PowerApps and it states:
data:image/png:base64,etcetc

 

What is you are suggesting I do?

Please use .png as file extension and run flow and see if you can open generated file.

 

Please like and Mark this as answer if it resolves your issue.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
Anonymous
Not applicable

@PrasadAthalye 

 

 

This doesnt work either, i wouldnt have thought it would make a difference, but changing to .png results in the same error when i try opening the file... any other suggestions in getting this working?

Hey @Anonymous @PrasadAthalye 

Check out this post- https://blog.encodian.com/2019/09/reduce-the-size-of-images-generated-by-powerapps-with-flow/

You don't need use the Encodian actions... but steps 4 to 8 explain what you need to do

HTH

Jay

Anonymous
Not applicable

Hi I have managed to use Shane Youngs video to copy over the image to a SP doc lib:

https://www.youtube.com/watch?v=ovLIwnj6QjU

 

I just need to add another action, where the original SP list gets updated with the image location, something I am struggling with:

 

I am using update file properties action and in the expression:

 

concat('https://URL/Lists/ListName', outputs('Update_file_properties')?['body/{FullPath}'])
 
The error I have is:
Could not find list item.
clientRequestId: ID
serviceRequestId: ID

 

I presume this is because it does not know which item to update? Unsure how to tell it to update the current item?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,813)