79221755

Date: 2024-11-25 05:47:46
Score: 1
Natty:
Report link

SharePoint does provide a Rest API to upload files.

Example REST API Request:

POST /sites/your-site/_api/web/GetFolderByServerRelativeUrl('/sites/your-site/your-library')/Files/Add(url='your-file-name.zip', overwrite=true)
Host: your-sharepoint-site.sharepoint.com
Authorization: Bearer your-access-token
Content-Type: application/octet-stream
Content-Length: your-file-size

(binary content of your-file-name.zip)

Reference:

Working with large files by using REST

Upload a file by using the REST API and jQuery

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Karley Zhou-MSFT