1

I have a ItemAdded remote event receiver for a document library in the host web. Event receiver works fine. However I would like to access the properties of the file object. (Would like to see the properties for a office document)

The file object does not have properties exposed but the MSDN post below says the file members have public properties exposed.

https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.file_members.aspx

Has anyone ever worked out a way to read the Microsoft.sharepoint.client.file properties?

0

I am able to solve the above problem to access custom file properties using OpenXML.

In this instance, I had to either create a WordProcessingDocument or SpreadsheetDocument from the File stream depending on the file type.

once I have the document I able to read the CustomFilePropertiesPart and access the properties as required.

Hope this helps someone.

Cheers,

ShanVeer.

-2
string filename = Convert.ToString(properties.ItemEventProperties.AfterProperties["Title"]);
  • add some explanation how your answer can help OP – Atish Dipongkor - MVP Jun 3 '16 at 7:24
  • Explanation will give more highlight on the resolution – Gaurravs Jun 3 '16 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.