TransWikia.com

Sharepoint PHP File Upload

SharePoint Asked by Markvdb on December 7, 2020

I’m new to Sharepoint integration. I’m hoping to get some answers and direction for the script. The current process requires an XML file to be uploaded into a library, from a separate website.

My initial search led me too: https://msdn.microsoft.com/en-us/library/office/dn769086.aspx as a article to read.

I’m concerned at what is needed, surely the script will need authentication before upload, can I target a specific library. And can this happen from a separate website.

What I would like to do is create the XML, and then upload that XML file into a Sharepoint library on a form submission. The form adds database entries into the external website application, from this data i’ll create a XML file which immediately needs to upload to the Sharepoint library.

Many thanks!

One Answer

You'll definitely want to look at the csom or REST api. You could throw an ajax request from your php upload over to the sharepoint site (if its accessible). You'll definitely have to authenticate. How you do that depends on what type of auth you use on SP. Are you wanting to upload the xml file as an attachment, or upload the xml file as data? If you're uploading data you might choose to skip xml altogether and just send the data over in the format sharepoint needs.

I did something similar, only I wanted a wall of protection as SP is our internal site. So I had the form send to email and then that person uploaded the attached csv. This may not be a good option for you however depending on how many entries you may receive. In our case it was only 1-2 a week. I provided an option so they could take the csv and drop it on an upload spot. Then the script parsed the csv to the appropriate sharepoint list fields.

So are you stuck with xml? DO you want a direct connection from your php server to your SP server?

Answered by Casey Govero on December 7, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP