I am sharing function to upload your files on local hard drive to SharePoint document library. In my scenario I have a file on local hard drive and upload this to a SharePoint document library and delete the file presented on local drive. The source code is // For Publish file to library private void PublishWorkbook(string strTempLocalPath, string strLibraryURL, string strFileName) { SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite siteCollection = new SPSite(SiteURL)) { ...
SharePoint Excellence is a community for Microsoft 365 professionals.