0

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);
clientContext.Load(file);                                        
ClientResult<Stream> streamResult = file.OpenBinaryStream();
clientContext.ExecuteQuery();

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.