Forum Discussion
Pulak2409
Mar 22, 2019Brass Contributor
SharePoint file upload using API
Is there any API available to upload file in SharePoint? Sample code will be helpful. If we upload same file using API will it replace the old file or create a new version of the file? Please adv...
- Mar 22, 2019
Pulak2409 Multiple APIs to do this.
REST API https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest
You can also use CSOM using FileCreationInformation https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/upload-large-files-sample-app-for-sharepoint
You have the option to overwrite files in both scenarios
Beau Cameron
Mar 22, 2019MVP
Pulak2409 Multiple APIs to do this.
REST API https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest
You can also use CSOM using FileCreationInformation https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/upload-large-files-sample-app-for-sharepoint
You have the option to overwrite files in both scenarios