The code that I am using which successfully uploads large file(s) to on- premises SharePoint 2013 (I have uploaded 1.9 GB file using this code) is given below. This was run successfully in some computers but failed in others. The configuration in on of the computers where this code failed is Windows XP SP3 32 bit with 4GB RAM. The 1.9 GB file is not getting uploaded through browser also. I am using Visual Studio 2010 SP1.
m_ClientContext.RequestTimeout = Timeout.Infinite;
using (FileStream fs = new FileStream(m_SourceFilePath.Text, FileMode.Open))
{
Microsoft.SharePoint.Client.File.SaveBinaryDirect(m_ClientContext, szFullFilePath, fs, true);
}
I know a part of the solution, i.e., to upload it in chunks. I have read much about this. But I am not getting a proper solution. Its been more than a week I am trying different tricks to solve this. Kindly help me in solving this problem.
Edit: The same file which I have uploaded to SharePoint 2013 in Windows Server 2008 R2 programmatically some days ago is not getting uploaded to it now. It fails to get uploaded to SharePoint 2013 through browser also in Windows Server 2008 R2.