cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gjeh
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
CFernandes
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
CFernandes
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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (87,460)