Null FileStream CSOM

developer sp1 461 Reputation points
2020-08-03T06:54:54.327+00:00

In SharePoint Remote Event Receiver, I'm try to get file stream from a ListItem:

List docs = clientContext.Web.Lists.GetById(listId);
ListItem item = docs.GetItemById(listItemId);
clientContext.Load(item);
clientContext.ExecuteQuery();
var file = item.File.OpenBinaryStream();

But it's returning null, is this limitation in Event Receiver ? I used to use this code in Console, it's working.

Please help to resolve it.

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,594 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful