title: Uploading large files to Sharepoint 365
body: <p>I'm using the CSOM to upload files to a Sharepoint 365 site.</p>
  
  <p>I've logged in succesfully with Claims based authentication using methods found here "<a href="http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx" rel="nofollow">http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx</a>"</p>
  
  <p>But using SaveBinaryDirect on the ClientContext fails with a 405 due to cookies being attached to request too late.</p>
  
  <p>Another method of using CSOM to upload files is similar to below. But with SP 365, this limits the file size to about 3 meg.  </p>
  
  <pre><code> var newFileFromComputer = new FileCreationInformation
                  {
                      Content = fileContents,
                      Url = Path.GetFileName(sourceUrl)
                  };
  
  
   Microsoft.SharePoint.Client.File uploadedFile = customerFolder.Files.Add(newFileFromComputer);
                      context.Load(uploadedFile);
                      context.ExecuteQuery();
  </code></pre>
  
  <p>Is there ANY way to do this using CSOM, SP 365 and file sizes up to say 100 meg? </p>