You can try the other approach to upload the files to sharepoint using invoke code
with help of the Assembly microsoft.sharepoint.client
check the sample for further deep dive
Upload_share_point (2).zip (3.0 KB)
In the above sample am using different ways to uploading a file
SaveBinaryDirect method on the Microsoft.SharePoint.Client.File class
- No file size limits. Time-out occurs after 30 minutes.
- Only use this method if you’re using a user-only authentication policy. A user-only authentication policy is not available in a SharePoint Add-in, but can be used in native device add-ins, Windows PowerShell, and Windows console applications.
ContentStream property on the FileCreationInformation class.
- file size limits.Upto 256 Mb
- Recommended for,SharePoint,ServerSharePoint Online
Content property on the FileCreationInformation class.
Maximum file size that can be uploaded is 2 MB. Time-out occurs after 30 minutes.
Get the list of Files and Folder names from Share_point
Get List_of_files_and_folder_name_from_sharepoint.zip (2.8 KB)