We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently CSOM allows to upload only < 2Mb files. Not cool, REST should be used.
The text was updated successfully, but these errors were encountered:
Test with CSOM and http://mysharepointlearnings.wordpress.com/2014/06/30/provider-hosted-app-upload-large-files-using-csom/ https://gist.github.com/garima2510/b1167e611ffb495848ec#file-uploadfilelarge-cs
var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext, SPHostUrl); using (var clientContext = spContext.CreateUserClientContextForSPAppWeb()) { if (clientContext != null) { //file is uploaded file. Could be read from Request.Files using (FileStream fs = new FileStream(file.FileName, FileMode.Open)) { //code for file size > 2MB. tested upto 50MB FileCreationInformation newFile = new FileCreationInformation(); newFile.ContentStream = fs; newFile.Url = Path.GetFileName(file.FileName); newFile.Overwrite = true; List docs = clientContext.Web.Lists.GetByTitle("List_Name"); Microsoft.SharePoint.Client.File uploadFile = docs.RootFolder.Files.Add(newFile); clientContext.Load(uploadFile); clientContext.ExecuteQuery(); } } }
Sorry, something went wrong.
Covered with SPMeta2.Regression.Tests.Impl.Scenarios.ModuleFileScenariousTest implementation for 1, 5, 15, 25 and 50Mb generated files.
SubPointSupport
No branches or pull requests
Currently CSOM allows to upload only < 2Mb files. Not cool, REST should be used.
The text was updated successfully, but these errors were encountered: