Upload Large Files to SharePoint

If you're worked with SharePoint, you know that there are several ways to upload files. The simplest is a simple function Files.Add. But, this approach is limited to files under 2MB in size. To upload larger files, you need to get a memory stream and upload the file in chunks.