Mugetsu
Mugetsu

Reputation: 1978

Sharepoint nodejs upload file

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?

Upvotes: 0

Views: 1788

Answers (1)

Kristian
Kristian

Reputation: 41

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.

Upvotes: 1

Related Questions