Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Upload large files to Sharepoint 365

$
0
0

I'm using the CSOM to upload files to a Sharepoint 365 site.

I've logged in succesfully with Claims based authentication using methods found here "http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx"

But using SaveBinaryDirect on the ClientContext fails with a 405 due to cookies being attached to request too late.

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.   var newFileFromComputer = new FileCreationInformation
                {
                    Content = fileContents,
                    Url = Path.GetFileName(sourceUrl)
                };

 Microsoft.SharePoint.Client.File uploadedFile = customerFolder.Files.Add(newFileFromComputer);

                    context.Load(uploadedFile);
                    context.ExecuteQuery();

  Is there ANY way to do this using CSOM, SP 365 and file sizes up to say 100 meg?

Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>