cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Madiko
Frequent Visitor

Cannot upload attachments using JSON PARSE

Hello everyone,

Can you please help me with this issue. I have an issue with parsing my file content in my flow for create a new file (SharePoint Document Library). I have PowerApp for to upload attachments using attachment control. I'm using it by JSON PARSE, actually it makes copy of a file and upload it to SharePoint. However, when I open my file in SharePoint it's corrupted and size is 1kb.

 

See my screenshots:

this error message what I have when I open a file in SharePoint

Madiko_0-1633053325155.png

 

 

 

This is how my flow looks:

Madiko_0-1633053493989.png

 

 

Madiko_1-1633053512285.png

 

 

Madiko_2-1633053523461.png

 

 

 

dataUriToBinary(items('Apply_to_each')['DataStream'])

 

I built this flow using this guide video: https://www.youtube.com/watch?v=5XsWgVnR7SU

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
ekarim2020
Super User
Super User

 

What output are you getting from the expression?

dataUriToBinary(items('Apply_to_each')['DataStream'])

You can use a compose action for this:

ekarim2020_1-1633199302925.png

After you re-run the flow, we expect to see something similar to the following as the output of the compose action. The output should show two properties $content-type and $content, example:

{
  "$content-type": "application/pdf",
  "$content": "JVBERi0xLjMNJeLjz9MNCjEgMCBvYmoNPDwvTGFuZyhmci1"
}

 Ellis

View solution in original post

1 REPLY 1
ekarim2020
Super User
Super User

 

What output are you getting from the expression?

dataUriToBinary(items('Apply_to_each')['DataStream'])

You can use a compose action for this:

ekarim2020_1-1633199302925.png

After you re-run the flow, we expect to see something similar to the following as the output of the compose action. The output should show two properties $content-type and $content, example:

{
  "$content-type": "application/pdf",
  "$content": "JVBERi0xLjMNJeLjz9MNCjEgMCBvYmoNPDwvTGFuZyhmci1"
}

 Ellis

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (4,747)