cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

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
Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

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

Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

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?

 

Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

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

Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

@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?



Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

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

Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

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?

Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

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.

Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

@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?

Highlighted
Super User II
Super User II

Re: How to convert Base64 Text in a SharePoint List

Hey @G99 @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

Highlighted
Post Prodigy
Post Prodigy

Re: How to convert Base64 Text in a SharePoint List

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,060)