I'm trying to open binary stream of a file when file is uploaded into document library by using Remote Event Receivers.

It was able to work with small files (< 5MB), but does not work with file > 5MB

var file = web.GetFileByServerRelativeUrl(fileRef);
ClientResult<Stream> streamResult = file.OpenBinaryStream();

I also increased RequestTimeout by:

clientContext.RequestTimeout = 10 * 60 * 1000;

Also, tried with but does not work

var fileInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(clientContext, fileRef);

Do you guys facing this issue?

Your Answer

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

Browse other questions tagged or ask your own question.