0
votes

I'm trying to upload a file to the SharePoint shared folder. I am able to upload a file using spsave but its uploading to the Files location. I would like to upload to the Shared location instead of Files location. Doing it in this way:

  const fileOptions = {
  folder: '/Documents/testing',
  fileName: 'test.txt',
  fileContent: 'hello world'
};

it's uploading to the Files location under testing folder I can see the file text.txt. Can't figure it out how to upload to the Shared folder. Is this possible? Can't find the related path for the shared destination. For Files it's Documents but what would be for the Shared??? Anyone have any knowledge about sharepoint onedrive and could help me with this?

1

1 Answers

1
votes

I don't think you can upload to OneDrive with spsave. It is for native SharePoint only afaik. If you want to share a file in OneDrive using a rest api I suggest to look at office graph.