# Sharepoint Library
Business processes often involves downloading/uploading data in SharePoint. SharePoint library helps the developers to create bots using SharePoint based functions. Using SharePoint library developers can effortlessly perform various operations such as downloading/uploading asynchronously.
# Method : public async Task(string) uploadDocumentAsync(string webUrl, string loginName, string pwd, System.IO.MemoryStream document, string folderServerRelativeUrl, string fileName)
Uploading a document to sharepoint
Parameters:
Fields | |
---|---|
webUrl | string - Url of the sharepoint which you want to upload the document |
loginname | string - sharepooint username |
pwd | string - sharepoint password |
System.IO.MemoryStream document | It will store the File size in the memorystream |
folderServerRelativeUrl | string - Specific folder url |
filename | string - filename |
# Method : public void DownloadFileViaRestAPI(string webUrl, ICredentials credentials, string documentLibName, string fileName, string path)
Download a document from sharepoint
Parameters:
Fields | |
---|---|
webUrl | string - Url of the sharepoint which you want to upload the document |
ICredentials credentials | username and password |
documentLibname | string-the complete folder path |
filename | string - name of the file |
path | string - final folder path |
# Method : public void DeleteFile(string UserName, string Password, string WebUrl, string folderServerRelativeUrlwithfilenameandextensiontodelete)
Delete a document from the sharepoint
Parameters:
Fields | |
---|---|
UserName | string - sharepoint username |
Password | string - sharepoint password |
webUrl | string - Url of the sharepoint which you want to upload the document |
folderServerRelativeUrlwithfilenameandextensiontodelete | string - folder structure |