title: MongoDB 3.2 C# driver version 2.2.3.3 Gridfs Download large files more than 2gb
body: <p>I am uploading files using the following code:</p>
  
  <pre><code>using (var s = File.OpenRead(@"C:\2gbDataTest.zip"))           
  
  {
  
   var t = Task.Run&lt;ObjectId&gt;(() =&gt;
  
  {
  
  return fs.UploadFromStreamAsync("2gbDataTest.zip", s);
  
  });
  
  
   return t.Result;
  
  }
  
  //works for the files below 2gb
  
    var t1 = fs.DownloadAsBytesAsync(id);
  
              Task.WaitAll(t1);
              var bytes = t1.Result;
  </code></pre>
  
  <p>I am getting error </p>
  
  <p><a href="https://i.stack.imgur.com/cnOET.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cnOET.png" alt="enter image description here"></a></p>
  
  <p>I am new to MongoDb and C#, can any one please show me how to download files greater than 2GB in size?</p>