-
Notifications
You must be signed in to change notification settings - Fork 3.3k
PnP/Samples/Core.RestFileUpload/ - Incorrect and/or misleading information in ReadMe #1558
Comments
Just realized that I didn't make it clear that I'm talking about SPO when I say there's a hard-coded limit on the uploaded file size using this all-at-once approach. In general we need to be more clear about the differences in SPO versus SharePoint on-prem, but this particular issue has led to some real confusion. I think it would be good if the PnP samples led by example in clarifying the differences in the APIs (if there is such a difference). |
Sorry, didn't mean to close the issue. |
thx Adam, I've just updated the readme based on your input. Your sample on doing large file uploads using REST would be absolutely also valuable for the community, if you are willing to share this. Readme has though now updated, so closing this one. Thx for the input. |
Thanks for the note Vesa. I think I did add the code on our SPDev blog, but it was so long ago I’ll have to check. We haven’t had a similar case since then.
I see the change in the Introduction, but IMHO, it’s still not clear enough:
If you really want to upload large files and you're on SharePoint Online the sliced upload is the advised approach. For on-premises or for files that can be uploaded within the security timeout window the REST approach is good one.
I think it should say:
If you want to upload file over 250 MB and you’re on SharePoint Online, you MUST use the sliced upload approach. The issue here is not the security timeout, but rather a hard file size upload limit set in the Web Application properties to which the tenant has no access. This setting is immutable, so you will not be able to upload file larger than 250 MB unless you use the chunked file approach.
Because that is the actual fact.
I’ll just include my example here and you can do with it what you will.
Best regards,
Adam Burns
[Description: MSFT_logo_Gray DE sized SIG1.png]
Sr. Support Escalation Engineer - SharePoint development
Email: adambu@microsoft.com<mailto:adambu@microsoft.com>
Phone: 425-707-2428
Hours: 10:00am-7:00pm Pacific M - F
From: Vesa Juvonen [mailto:notifications@github.com]
Sent: Monday, January 30, 2017 11:13 AM
To: SharePoint/PnP <PnP@noreply.github.com>
Cc: Adam Burns <adambu@microsoft.com>; State change <state_change@noreply.github.com>
Subject: Re: [SharePoint/PnP] PnP/Samples/Core.RestFileUpload/ - Incorrect and/or misleading information in ReadMe (#1558)
thx Adam, I've just updated the readme based on your input. Your sample on doing large file uploads using REST would be absolutely also valuable for the community, if you are willing to share this. Readme has though now updated, so closing this one. Thx for the input.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#1558 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMKa6b7w9r_-9zA-bFIYDwuxIszEhsi-ks5rXjYogaJpZM4Km3Ob>.
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using System.Web.Script.Serialization;
namespace Core.RestFileUpload
{
/*
Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code form of the Sample Code, provided that. You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the Sample Code.
-This is intended as a sample of how code might be written for a similar purpose and you will need to make changes to fit to your requirements.
-This code has not been tested. This code is also not to be considered best practices or prescriptive guidance.
-No debugging or error handling has been implemented.
-It is highly recommended that you FULLY understand what this code is doing and use this code at your own risk.
*/
class Program
{
/// <summary>
/// Change this contant if you are having trouble and
/// want to experiment with different chunk sizes.
/// Currently set to the recommended chunk size.
/// </summary>
const int chunkSize = 10 * 1024 * 1024;
static string formDigest;
static string token;
static void Main(string[] args)
{
string url = "http://adambu-rrvmas16";
/// SharePoint site Relative Url
string folderUrl = "/Shared%20Documents";
ChunkFile(url, folderUrl, @"F:\temp\BigBig\test500.txt");
//UploadSaveBinaryStream(url, folderUrl, @"F:\temp\BigBig\test500_2.txt");
//UploadDocumentContent(url, "Documents", @"F:\temp\BigBig\test500_2.txt");
}
/// <summary>
/// Worker menthod. Does all the chunking and uploading.
/// </summary>
/// <param name="baseUrl">Site collection url</param>
/// <param name="folderUrl">site relative url of the folder where
/// the file is to be uploaded</param>
/// <param name="filePath">Path to the file on the local file system.</param>
static void ChunkFile(string baseUrl, string folderUrl, string filePath)
{
using (var client = new WebClient())
{
try
{
//token = GetAccessToken(baseUrl);
formDigest = GetFormDigest(baseUrl);
client.BaseAddress = baseUrl;
client.Headers.Add("X-RequestDigest", formDigest);
//client.Headers.Add("Authorization", "Bearer " + token);
client.Credentials = CredentialCache.DefaultCredentials;
client.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36");
var fileUrl = "/Shared%20Documents/test500.txt"; //File's url after initial upload.
var fileName = System.IO.Path.GetFileName(filePath);
//Special handling for the start of file upload
var firstChunk = true;
//Special id for the timeout lifetime
var uploadId = Guid.NewGuid();
var offset = 0L;
using (var inputStream = System.IO.File.OpenRead(filePath))
{
var buffer = new byte[chunkSize];
int bytesRead;
while ((bytesRead = inputStream.Read(buffer, 0, buffer.Length)) > 0)
{
if (firstChunk)
{
//Upload the initial empty file
var endpointUrl = string.Format(
"{0}/_api/web/GetFolderByServerRelativeUrl('{1}')/Files/Add(url='{2}', overwrite=true)",
baseUrl, folderUrl, fileName);
try
{
client.UploadData(endpointUrl, new byte[0]);
}
catch (WebException ex)
{
HandleWebException(ex);
}
// chunking to start
endpointUrl = string.Format(
"{0}/_api/web/getfilebyserverrelativeurl('{1}')/startupload(uploadId=guid'{2}')",
baseUrl, fileUrl, uploadId);
try
{
client.UploadData(endpointUrl, buffer);
}
catch (WebException ex)
{
HandleWebException(ex);
}
firstChunk = false;
}
//This is for the final chunk.
else if (inputStream.Position == inputStream.Length)
{
var endpointUrl = string.Format("{0}/_api/web/getfilebyserverrelativeurl('{1}')/finishupload(uploadId=guid'{2}',fileOffset={3})", baseUrl, fileUrl, uploadId, offset);
var finalBuffer = new byte[bytesRead];
Array.Copy(buffer, finalBuffer, finalBuffer.Length);
try
{
client.UploadData(endpointUrl, finalBuffer);
}
catch (WebException ex)
{
HandleWebException(ex);
return;
}
}
else //As we're continuing on each chunk...
{
var endpointUrl = string.Format("{0}/_api/web/getfilebyserverrelativeurl('{1}')/continueupload(uploadId=guid'{2}',fileOffset={3})", baseUrl, fileUrl, uploadId, offset);
try
{
client.UploadData(endpointUrl, buffer);
}
catch (WebException ex)
{
HandleWebException(ex);
return;
}
}
offset += bytesRead;
Console.Clear();
Console.WriteLine("%{0:P} completed", (((float)offset / (float)inputStream.Length)));
}
}
}
catch (Exception ex)
{ }
Console.ReadKey();
}
}
/// <summary>
/// This approach uses the SaveBinaryStream method. It will NOT work in SPO and in on-prem you must up
/// the Maximum File Upload Size under Web Application Settingings (General Settings).
/// </summary>
/// <param name="baseUrl"></param>
/// <param name="folderUrl"></param>
/// <param name="filePath"></param>
static void UploadSaveBinaryStream(string baseUrl, string folderUrl, string filePath)
{
using (var client = new WebClient())
{
try
{
//token = GetAccessToken(baseUrl);
formDigest = GetFormDigest(baseUrl);
client.BaseAddress = baseUrl;
client.Headers.Add("X-RequestDigest", formDigest);
//client.Headers.Add("Authorization", "Bearer " + token);
client.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36");
client.UseDefaultCredentials = true;
var fileUrl = "/Shared%20Documents/BigNew.txt"; //File's url after initial upload.
var fileName = System.IO.Path.GetFileName(filePath);
//Special id for the timeout lifetime
var uploadId = Guid.NewGuid();
//var offset = 0L;
var buffer = new byte[chunkSize];
//Upload the initial empty file
var endpointUrl = string.Format(
"{0}/_api/web/GetFolderByServerRelativeUrl('{1}')/Files/Add(url='{2}', overwrite=true)",
baseUrl, folderUrl, fileUrl);
try
{
client.UploadData(endpointUrl, new byte[0]);
}
catch (WebException ex)
{
HandleWebException(ex);
}
using (var docStream = System.IO.File.Open(filePath, FileMode.Open))
{
docStream.Seek(0, SeekOrigin.Begin);
byte[] fileBytes;
using (var memoryStream = new MemoryStream())
{
docStream.CopyTo(memoryStream);
fileBytes = memoryStream.ToArray();
}
endpointUrl = string.Format("{0}/_api/web/getfilebyserverrelativeurl('{1}')/savebinarystream?@target='{2}'", baseUrl, fileUrl, baseUrl);
try
{
client.UploadData(endpointUrl, fileBytes);
}
catch (WebException ex)
{
HandleWebException(ex);
return;
}
}
}
catch (Exception ex)
{ }
Console.ReadKey();
}
}
static void UploadDocumentContent(string baseUrl, string libraryName, string filePath)
{
try
{
ClientContext ctx = new ClientContext(baseUrl);
ctx.Credentials = CredentialCache.DefaultCredentials;
Web web = ctx.Web;
List docs = web.Lists.GetByTitle(libraryName);
byte[] fileData = System.IO.File.ReadAllBytes(filePath);
using (System.IO.Stream stream = new System.IO.MemoryStream(fileData))
{
var fci = new FileCreationInformation
{
Url = System.IO.Path.GetFileName(filePath),
ContentStream = stream,
Overwrite = true
};
Folder folder = docs.RootFolder;
FileCollection files = folder.Files;
Microsoft.SharePoint.Client.File file = files.Add(fci);
ctx.Load(files);
ctx.Load(file);
ctx.ExecuteQuery();
}
}
catch (WebException wex)
{
Console.Write(wex.ToString());
}
catch (Exception ex)
{
Console.Write(ex.ToString());
}
}
#region Utililty Methods
/// <summary>
/// This is I can call the same code in every catch block.
/// </summary>
/// <param name="ex"></param>
private static void HandleWebException(WebException ex)
{
var error = ex.Response.GetResponseStream();
StreamReader sr = new StreamReader(error);
Console.WriteLine("\nResponse received was {0}", sr.ReadToEnd());
throw ex;
}
/// <summary>
/// Demonstrates how to get the FormDigest. It may not always be necessary.
/// </summary>
/// <param name="baseUrl">The site collection url.</param>
/// <returns>The form digest string. Just attach to the Headers.</returns>
static string GetFormDigest(string baseUrl)
{
HttpWebRequest restRqst = (HttpWebRequest)HttpWebRequest.Create(baseUrl + "/_api/ContextInfo");
//restRqst.Headers.Add("Authorization", "Bearer " + token);
restRqst.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36";
restRqst.Method = "POST";
restRqst.Accept = "application/json;odata=verbose";
//restRqst.Credentials = spoCreds;
restRqst.UseDefaultCredentials = true;
restRqst.ContentLength = 0;
string xHeader = string.Empty;
using (HttpWebResponse restResponse = (HttpWebResponse)restRqst.GetResponse())
{
Stream postStream = restResponse.GetResponseStream();
StreamReader postReader = new StreamReader(postStream);
string results = postReader.ReadToEnd();
JavaScriptSerializer jss = new JavaScriptSerializer();
var d = jss.Deserialize<dynamic>(results);
xHeader = d["d"]["GetContextWebInformation"]["FormDigestValue"];
}
return xHeader;
}
/// <summary>
/// Gets the access token using Token Helper.
/// </summary>
/// <param name="url">Site Collection url.</param>
/// <returns>The access token as a string.</returns>
internal static string GetAccessToken(string url)
{
Uri uri = new Uri(url);
string realm = TokenHelper.GetRealmFromTargetUrl(uri);
//Get the access token for the URL.
// Requires this app to be registered with the tenant
string accessToken = TokenHelper.GetAppOnlyAccessToken(
TokenHelper.SharePointPrincipal,
uri.Authority, realm).AccessToken;
return accessToken;
}
#endregion Utility Methods
}
}
|
Hi Adam, |
* Updated the provisioning template by modifying the RegionalSettings attribute CalendarType="Gregorian". When set to "none", it causes blank pages after deployment. See pnp/PnP-Sites-Core#715 for more information. Now we can use the Pnp PowerShell cmdlet august version. * Added the Part 3 article link of the documentation. * Added the Part 4 of the documentation link (Navigation implementation) * Updated the contextual menu behavior. Now the parent section is displayed for sub pages (i.e non root pages). * Updating js core lib in samples add-in * Added the Part 5 of the documentation (Localization) * Updated the PnP JSCore library to 1.0.4 * Added the Provisioning.PnPDeployer.Console folder within the samples. A small console application for deploying PnP XML templates and open xml packages through a userfriendly sequences configuration file. * Added the README.md file. * Updated the README.md file with valid internal references. * Updated internal references with page-relative references. * Added sample readme tracking to all components, samples and solutions. * Migrating ASP.NET Core Authentication library projects and structure Added the first cut of the migration to RTM. Library and Sample Web ready * Migrating ASP.NET Core Authentication library to RTM - added wwwroot * Migrating Core Authentication from RC1 to RTM - cleanup Cleaning up old solution files * Migrating Core Authentication from RC1 to RTM - further cleanup Cleaning up old solution files * Updated sample to work with modern site contents page. * Updated readme for the sub site sample on provided changes. * Added metrics tracking for the portal sample solution readme * Updated README.md to the readme-template standards * Added usage tracking for the new PnP Deployer sample * Migrated PnP Core Authentication to ASP.NET Core 1.0.0 This is the first cut build to use the SharePoint CSOM library with ASP.NET Core * ASP.NET Core Authentication - added CliendId check and removed cookies * Added the last part of the documentation (part 6). * Casing fix for README files * September 2016 release * Rename to README.md * Rename to README.md * Rename to README.md * Rename to README.md * September 2016 release * September 2016 release * September 2016 release (pnp#1524) * September 2016 release September 2016 master merge * September 2016 release * Rename to README.md (pnp#1526) * ASP.NET Core Authentication - README.md update (pnp#1527) * AspNetCore Auth - Added a NuGet and NuSpec files AspNetCore Auth - Added a NuGet and NuSpec files to reference the OfficeDevPnP.Core.Framework.Authentication.dll file in another project * AspNetCore Auth - updated readme.md to clarify RTM support * Improvements made to the O365 starter intranet solution (pnp#1529) * Added a caoursel component. * Updated the provisioning schema version to 201605. Added promoted links on home page. Added sample content for the carousel and links. Fixed the "FR" labels translations with moment.js. Added a custom theme with spcolor. Updated nuget packages for the extensibility provider solution for the PnP core assembly. * Updated the home page screenshot in the README file. * Asp net core authentication (pnp#1533) * AspNetCore Auth - Added a NuGet and NuSpec files AspNetCore Auth - Added a NuGet and NuSpec files to reference the OfficeDevPnP.Core.Framework.Authentication.dll file in another project * AspNetCore Auth - updated readme.md to clarify RTM support * Cleanup and changed version to 1.1.0 * October 2016 release * Fix a type that causes NullReference exception (pnp#1542) * update to pnp.js from 1.0.5 release * Commit example including knockout, accordion, and REST * Fixed references to old Yammer group for discussion * Update ISSUE_TEMPLATE.md * Forced the 1.0.4 version for the sp-pnp-js package. Running "npm install" with the "^" caret character, will update to the 1.0.5 version causing issues with TypeScript versions. (pnp#1551) * Provisioning.pn p deployer.console (pnp#1552) * Added a configurable parameter that allows the deployer to ignore folders in order to speed up the tokenizing process. Updated the token file XSD for a more consistent XML. Fixed a bug related to tokens loaded from the App.config file. Removed the project build events. * Update FieldsExtensibilityProvider.md * Update README.md * Added the custom Required attribute to the FieldsExtensibilityProvider serializable classes. * Added the ignored extensions functionnality Added the ignored extensions functionnality in order to be able to ignore specific file extensions for the tokenizing process. This makes sure that files such as images, videos, pnp packages etc aren't corrupted by the tokenizer opening them and saving them in a corrupted format. * Added the ignored extensions functionnality Added the ignored extensions functionality in order to be able to ignore specific file extensions for the tokenizing process. This makes sure that files such as images, videos, pnp packages etc aren't corrupted by the tokenizer opening them and saving them in a corrupted format. * Added the ignored extensions functionnality Added the ignored extensions functionnality in order to be able to ignore specific file extensions for the tokenizing process. This makes sure that files such as images, videos, pnp packages etc aren't corrupted by the tokenizer opening them and saving them in a corrupted format. * Removed the previously added ignored extensions parameter Removed the previously added ignored extensions parameter and replaced it by a more dynamic way of handling the problem. * Removed the previously added ignored extensions parameter Removed the previously added ignored extensions parameter and replaced it by a more dynamic way of handling the problem. * Removed the previously added ignored extensions parameter Removed the previously added ignored extensions parameter and replaced it by a more dynamic way of handling the problem. * NuGet package reference fixes * November 2016 release * Update Program.cs (pnp#1567) NullRef on pagedCollection * Updated InjectResponsiveCSS to use PnP Core component - so that responsive samples are aligned and using the exact same solution. * First implementation of a sample Office 365 Connector * Small fixes to Office365.Connectors sample * Anonymized config file. * Added readme.md * Updated PnP Core library to laterst version, fixed issue with JSON.NET. Fixed "UIVersion" error. (pnp#1570) Closes pnp#1569 * Updated webcast link to readme * December 2016 release * ASP.NET Core Authentication - remove Microsoft.IdentityModel.Extensions.dll dependency (pnp#1572) * AspNetCore Auth - Added a NuGet and NuSpec files AspNetCore Auth - Added a NuGet and NuSpec files to reference the OfficeDevPnP.Core.Framework.Authentication.dll file in another project * AspNetCore Auth - updated readme.md to clarify RTM support * Cleanup and changed version to 1.1.0 * Work on removing Microsoft.IdentityMode.Extensions dependency * Cleaned up SSL error catch * Removed Microsoft.IdentityModel.Extensions.dll :) * Updated readme with latest information and links * Fix deploy cmdlets (pnp#1580) * Fix changes in the cmdlets from *-SPO* to *-PnP* * typo * Fix changes in the cmdlets from *-SPO* to *-PnP* * Remove DLL * Remove DLL * Fixed small md format issue * January 2017 release * Updated to use CSOM from SPO NuGet package. packages.config was for some reason missing. * TaxonomyPicker: raise change event on hidden field (pnp#1591) (pnp#1592) Raise the 'change' event on the hidden input field every time the value changes * Updated the solution with TypeScript 2.1.15 and PnPJs Core 2.0.0 + Fixed some typos * Refactored the solution for SharePoint 2013. Used sp-pnp-js 1.0.6 instead of 2.0.0 because of wrong Webpack output (the 2.0.0 adds "const" in the outputed JS file). * Fixed a bug in the pageInfo component due to SharePoint 2013 (the JSON response is different from SharePoint Online) * Added refactoring notes for SharePoint 2013. Updated the README file for installation. * Updated the folder structure * Updated the README.md to link with the refactoring notes. * Updated the refactoring notes to add the October 2016 CU. * Updated gitignore to include dlls * Added dlls for extensibiliy provider * Updated NuGet and modified code to be more flexible * Fixed typos in the deployment script * Updated readme based on issue pnp#1558 * Updated settings and tested for SPO * Updated NuGet packages * Added the SharePoint Online folder with the dedicated solution. For now, the JS code is the same between the SharePoint Online and the SharePoint 2013 solution. Only the deployment is different. Fixed a bug with the page layouts. The PnP token {contenttypeid:Page Layouts} is not applied (using the version 2.11.1701.1 of the PnP cmdlets). Replaced with the hard coded ContentTypeId value for page layouts (fixed also in the SharePoint 2013 RootSiteTemplate.xml file). * Updated the README file for the SharePoint 2013 solution * Updated file upload limit description to be more precise * Fixed the master page content type id value for the template. Updated the solution to be compatible with SharePoint 2013/2016 and Online. All page layouts and master pages reference the 15.0.0.0 version to be compatible. No need to use the 16.0.0.0 version. No webparts for now. Wait for the PnP fix (10th February). * Fixed typos. * Merged all the solution into a single folder (no more folder for each versions). * Updated images and README.md Updated folders to lower case * Reset the folder * Clean commit with remaned folders * Clean commit with remaned folders * Fixed some typos in the README.md file * Updated the prerequisites about MMS for on-premises deployments in the README file * Added missing image * Updated README file * Update LICENSE * Added webparts to the PnP provisioning template for aspx pages. Webparts provisioning does not work with SharePoint 2013/2016 on-premises with the PnP Juanuary 2017 release (issue pnp/PnP-Sites-Core#866). * Fixed typos * Added webparts to the PnP provisioning template for aspx pages (pnp#1602) * Added webparts to the PnP provisioning template for aspx pages. Webparts provisioning does not work with SharePoint 2013/2016 on-premises with the PnP Juanuary 2017 release (issue pnp/PnP-Sites-Core#866). * Fixed typos * Last minute fix for the assembly version of webparts in the provisioning template. We need to target the right assembly version according to the SharePoint version. * Fix for PnP Intranet for webparts assembly version (pnp#1604) * Added webparts to the PnP provisioning template for aspx pages. Webparts provisioning does not work with SharePoint 2013/2016 on-premises with the PnP Juanuary 2017 release (issue pnp/PnP-Sites-Core#866). * Fixed typos * Last minute fix for the assembly version of webparts in the provisioning template. We need to target the right assembly version according to the SharePoint version. * Script bundling support for resources js (pnp#1593) (pnp#1596) Instead of always loading the resources file via jQuery ajax, the global namespace is first checked for the presence of the resources. If it's there, then do not load the resources. This allowes pre-loading the resources in the page. * February 2017 release * Fixed merge issue * February 2017 release February 2017 release * Updated for the Feb release * February 2017 release * Updated readme to cross reference the webhook guidance * Fixed TypeScript version to 2.2.0. The 2.2.1 version seems to have issues with the whatwg types (refer to SharePoint/PnP-JS-Core#331) (pnp#1615) * Updated properly to VS2015 version * Added simplistic sample on how to use SharePoint REST APIs from console application to provision modern team site with associated Office 365 group * March 2017 release * update pnp.js for latest version 2.0.2 * Sample showing how to use the PnP Support for programming modern pages * Updated the PnP PowerShell commands used to use the new PnP prefix instead of the SPO so they will remain working once these are retired in June (pnp#1636) * Change ps credential to web login (pnp#1637) * Updated the PnP PowerShell commands used to use the new PnP prefix instead of the SPO so they will remain working once these are retired in June * I suggest switching from credentials in the Connect-PnPOnline to a -UseWebLogin as that covers all scenarios, also the (hopefully) more likely one of using MFA which won't work with the current Credentials option * TaxonomyPicker without JSOM (pnp#1640) * Added MVC based TaxonomyPicker wich requires no add-in web * Added Documenttation * added documentation file * updated documentation * updated documentation again.... * again * again * and again.. * Updated Documentation * Updated Documentation * Folder rename for new taxonomy picker sample and added tracking image for usage details * Add in permissions (pnp#1628) * Removed Web Full Control and Sitecollection Full Control as it makes no sense since there's already Tenant FullControl * Removed Web Full Control and Site Full Control permissions as it makes no sense since Tenant Full Control is already being requested * Removed csproj reference to the missing TeamSiteSubSiteTemplate.xml file so at least it compiles again (pnp#1629) * Removed commented out ClientSecret. Should be in appSettings.config anyway and someone left his ClientSecret commented out in the web.config. (pnp#1630) * Added Dutch translation (nl-NL) (pnp#1631) * Added Dutch translation (nl-NL) * Fixed language error based on feedback from Erwin * April 2017 release * Update summary text for smoother reading (pnp#1651) Updating summary text on README.md for smoother syntax and language. * Mvc taxonomy picker updated (pnp#1644) * No more ViewModel so it´s now MVC not MVVM. Updated so that validation works for the hidden inputs * updated documentation for cascading taxonomypickers * updated documentation again * fixed setting values from the controler * fixed nullvalue for EditorTemplate Model * Support for loading default value by label only (pnp#1646) New option 'initialLabels' to allow loading defaults by label, where the initial IDs are not known. * Update tsconfig.json (pnp#1655) Fix for Issue pnp#1645 As proposed by https://github.com/jbarrar * May 2017 release * Update ManagedMetadata.js (pnp#1657) When the taxonomy field was null, the cascading drop downs were not rendered correctly. Only an empty drop down field was shown with message "Loading...." * PnP Starter intranet v1.3 (pnp#1659) * Initial commit for the starter intranet v1.3 solution * UI updates * Added missing files * Added flag icons for the language switcher component * Updated the deployment script + bug fixes * Added missing files for the flags sprite * Removed unused parameter from the provisioning template Updated package.json information * Added the bot chat panel. Need some branding and rework. * Optimized sp-pnp-js imports (import only needed namespaces). * Added the logic to see if the bot configuration has been set. * Added the bot link in the header links. * Added the locale support for the bot chat control. Added a description for the HideSideBar field. * Optimized the webpack bundle size * Added missing fields for Bot configuration in the provisioning template. * Updated the provisioning schema for the IntranetContact column (default value doesn't work with SharePoint 2013). Removed the intranet logo file. * Updated the search schema and display templates to replaced the EndDateOWSDATE by RefinableString05. In SharePoint Online, this managed proeprty doesn't exist anymore... CSS updates Updated images in the README file * Updated the README file with the bot integration gif. * Changed the release date in the README file * Updated the README file * Fixed script exception by adding a variable in front of Add-PnPFile (pnp#1663) * Initial release * Fixed formatting issues * Updated readme content * Updated readme content * Fix bug when filterTerm == undefined due to .Name being used (pnp#1665) * added userInfo control * merge of pr1675 * June 2017 release * Dal (pnp#1678) * Corrected stock ticker control to use intended storage. * formatting issue * Updating NuGet packages for provisioning console sample * fix typos (pnp#1685) * Updated to show new capabilities * August 2017 release * RemoteCalendarAccess: fixed WKST casing in RRULES (pnp#1690) * Updated sample to work with latest PnP Sites Core nuget package * September 2017 release * Cleaning intranet v2 * Intranet v2.0 release from Franck Cornu * September 2017 release * PnP Starter Intranet 2.0 - New folder (Business.SharePointIntranet) (pnp#1697) * Removed previous code * Added the code for the v2.0 of the PnP Starter Intranet Solution * Updated README * Fix button alignement * PnP Starter Intranet v2.0 release * Deleted old folder "Business.StarterIntranet" and created a new one for the version 2.0.0 * Reverted back to the original folder name * September 2017 release * PnP Starter Intranet - Replaced the Myriad font by Segoe UI from Office UI fabric due to licence restriction. (pnp#1701) * v1 of the Multi-Geo developer samples. Aligns with guidance provided via https://aka.ms/multigeo-developer-guidance * Removing solution documentation section from the readme due business references * September 2017 Release * Adding simple console application for creating Comm sites with REST API * Wording update in readme for communication site rest api sample * October 2017 release * Added link to the associated blog post (pnp#1714) @vesa I didn't see you striped out this part. Can I have at least a link to my own blog to indicate there is actually a documentation available? Thanks! * October 2017 release * Added telemetry * Added telemetry support * Added telemetry * Update to include new csom approach for getting personalsitehost * New solution: Governance.EnsurePolicy * November 2017 release * Added the link to the associated PnP Webcast Youtube video (pnp#1720) * Added the link to the associated PnP Webcast Youtube video (pnp#1720) (pnp#1722) * November 2017 release * November 2017 release * Initial commit of Provisioning.CreateModernSites sample * Added support for provisioning templates to Provisioning.CreateModernSites sample application. * linking readme to new articles on docs.microsoft.com * Code complete for Provisioning.CreateModernSites sample application. * Code Fixup for Provisioning.CreateModernSites sample project * Final stage of Provisioning.CreateModernSites: documentation * Small fix to Provisioning.CreateModernSites documentation * Small fixes to provisioning code of Provisioning.CreateModernSites sample * Updated descriptions and small fix to the ModernSitesHelper class. * Renamed projects, fixed webjob, removed site classification * All good, just waiting for next SharePointPnP Core Library. * December 2017 release * December 2017 release * Updated sample Provisionig.Cloud.Modern.Async with SharePoint PnP Core Library v. 2.21.1712.2 * Added more details to the Provisioning.Cloud.Modern.Async README.md file * December 2017 release * Fixed bug pnp#1736 when "PublishingImage" property was not present on the search item result. Added an "if" condition before displaying the HTML markup. * January 2018 release * Asp net core.2.0.authentication (pnp#1698) * Visual Studio 2017 one way upgrade of xproj to csproj * Updated to work with .net core 2.0 authentication changes. * Update README.md Updated version history and code examples * Reverted AspNetCore.Mvc.StarterWeb to use localhost Kestrel web server instead of Azure App Service. Reverted to .NET Framework 4.6.1 from 4.7 Removed IgnoreSslErrorsConnectionFilter.cs as it is no longer used. Added OfficeDevPnP.Core.Framework.Authentication.2.0.0.nupkg nuget package. * PnP Starter Intranet - Migrate to 2.1.0 version * Updated screenshots in the README file. * PnP Starter Intranet - Updated README file. * PnP Starter Intranet - Added people search experience screenshot (desktop) * PnP Starter Intranet - Fixed typos in the README file * February 2018 release * Sample extensibility provider to extract pages * [PnP Starter Intranet] Added an unique identifier (the site collection relative URL) in the local storage values for navigation. now we are able to browse multiple instances of the solution within the same browser without navigation conflicts + minor fixes. * New sample shows how to discover a multi-geo setup using the CSOM API * Added PnP changelog * Updated CHANGELOG.md to be up to date with all pending March release changes * updated to be aligned for March release * sample does compile with latest csom redist * Modern and automated provisioning by using a Bot, Flow, Azure Function and SPFx (pnp#1759) * first commit * added the readme with a first description * added more descriptions * Added microsoft flow package * new powershell script to create the list, readme updated and minor improvements * readme updated * images added * uupdated * minor changes * updated * solution architecture added * Added telemetry and blog post url * updated * prep release notes for release * March 2018 release
Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you. If you have a actual question, we would ask you to use PnP Yammer group at http://aka.ms/OfficeDevPnPYammer. Thanks!
Which PnP repository to report the issue?
Category
[X ] Bug
[ ] Enhancement
Environment
[X] Office 365 / SharePoint Online
[ ] SharePoint 2016
[ ] SharePoint 2013
If SharePoint on-premises, what's exact CU version:
Expected or Desired Behavior
DOC BUG:
In the Readme these statements are false or misleading:
Using the REST approach, you do not need to slice your file into pieces and can send a file up to 2 GB, but the same security time-out restrictions mentioned in the large upload sample apply here. If you really want to upload large files and you're on SharePoint Online the sliced upload is the advised approach. For on-premises or for files that can be uploaded within the security timeout window the REST approach is good one.
I have confirmed there is a hard coded size limited of 250 MB in SPO. So for file larger than that you MUST use the chunked file approach. Given that, there is a rather glaring absence of a "pure" rest example. I came up with one using WebClient, but it was pretty hard, and involved some experimentation. This example definitely left my customer with the impression that they could avoid the chunking if they used REST. I have seen that repeated in numerous blogs on the internet.
I'm happy to provide my example, but not going to put it here because the bug report is about the ReadMe file. If you want my complete example, let me know.
Observed Behavior
Any file larger than 250 megabytes uploaded with this example will result in:
Microsoft.SharePoint.Client.InvalidClientQueryException: The request message is too big. The server does not allow messages larger than 262144000 bytes. at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(ClientServiceHost serviceHost, Stream inputStream, IList`1 pendingDisposableContainer)
The text was updated successfully, but these errors were encountered: