Update media file properties with managed metadata content in sharepoint online via Office Preview API

414 views Asked by At

I register my mobile application in office 365 through AzureAD subscription.

SharePoint Online document library is the cloud storage place for my apps file contents.

I used FileRest API and php to handle the webservice call between my application and 365 Office preview API.

I added a managed metadata columns in SharePoint online.

My requirement is to while sending files from my application to server(SharePoint online document library)

I need to upload media files with additional metadata contents like media uploaded location,vendor info's,etc...

I referred the below links to add managed metadata in SharePoint ,

https://social.technet.microsoft.com/Forums/office/en-US/b3c5f686-991f-4685-8dce-547a962fb1db/rest-post-upload-file-with-metadata?forum=sharepointdevelopment

http://sharepointfieldnotes.blogspot.com.es/2014/04/uploading-documents-and-setting.html

Finally i found there is no a way to upload a file + metadata at the same time. So the solution is to uploaded a document. Then found that document, and updated it using "MERGE" with all the metadata needed to populate it with. I use this url to upload file "https://reftes.sharepoint.com/_api/v1.0/me/files/root/children/'.rawurlencode($filename).'/content';"

This is the REST API url to get the properties of the file uploaded in the server. GET {base-url}/files/{file-id}

This is the REST API url to update the properties of the files in the server.

PATCH {base-url}/files/{file-id}

I am totally confused to use which API url for merge the files metadata contents.

How to update the managed metadata contents to a file,once after uploading files from mobile application to cloud storage(Office 365 API>>>SharePointOnline>>>DocumentLibrary)?

0

There are 0 answers