Uploading a String to a Folder

To upload a string (file content) to a folder in SharePoint, use the following syntax:

get a file at "<file-url>"
get a folder at "<folder-url>"
upload the file to the folder where
  the filename is "<new-filename>"

Example:

get a file at "https://company.sharepoint.com/sites/ProjectX/Documents/file.docx"
get a folder at "https://company.sharepoint.com/sites/ProjectX/Documents"
upload the file to the folder where
  the filename is "newfile.docx"

Last updated

Was this helpful?