cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver III
Resolver III

Upload File to SharePoint

Hello all,

 

Some months ago I came across this shane young video.

I used his method to create a file upload function and it worked like a charm for a long time.

However ever since I made the grave mistake of moving my app&flows to a Solution environment/package things have been breaking down without explanation, warning or anything changing at all except going inside the solution.

 

These are run histories of my uploadfile flow from inside and outside the solution:

uploadFile.png

Both runs ''succeeded'' however only the left run left me with a file i could open, the right one made a corrupt file.

It seems obvious there is a difference in how the file content is structured - left we have a list object with content-type and content seperated and on the right side all i have is the base64 string.

 

How the flow is called:

UploadAFile.Run(Last(DataCardValue30_1.Attachments).Name;varBase64Only)

 

I'm puzzled as to why it can be so different.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@gjeh I think it is not Inferring the Content Type.

 

Can you please try to Convert base64ToBinary(<your file content>) function and then create the file in SharePoint? 

 
 

Untitled.png

 

 

Let me know if it helps.

 

 

View solution in original post

3 REPLIES 3
Super User III
Super User III

@gjeh I think it is not Inferring the Content Type.

 

Can you please try to Convert base64ToBinary(<your file content>) function and then create the file in SharePoint? 

 
 

Untitled.png

 

 

Let me know if it helps.

 

 

View solution in original post

Thanks a quadrillion m8! This was it. How can I have looked over this for so long? I don't know but I'm super glad your input got it fixed.

@gjeh Cheers Mate 😊.

 

I am glad that your problem is resolved.

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (10,608)