Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is saved file #50

Closed
stychu opened this issue Jun 21, 2019 · 6 comments
Closed

Where is saved file #50

stychu opened this issue Jun 21, 2019 · 6 comments

Comments

@stychu
Copy link

stychu commented Jun 21, 2019

I am testing spsave for automation of uploading files to the SP. I was able to save file but I have no idea where it's now.

[16:34:07] spsave: Creating folder or full folders hierarchy: 'TESTING'
[16:34:08] spsave: test.txt checked out.
[16:34:09] spsave: test.txt successfully uploaded to 'https://.........sharepoint.com/personal/........../TESTING' and checked in. Checkin type: major
saved

Looking through the sahrepoint onedrive webapp interface: files / recent/ shared / recycle bin can't find the created file. Also going on the generated link gives me NOT FOUND

@s-KaiNet
Copy link
Owner

Could you post your whole code, please? Don't forget to remove all sensitive information.

@stychu
Copy link
Author

stychu commented Jun 21, 2019

const { spsave } = require("spsave");

const coreOptions = {
  siteUrl: 'https://.......sharepoint.com/personal/.....',
  notification: true,
  checkin: true,
  checkinType: 1
};
const creds = {
  username: process.env.username,
  password: process.env.password,
  // online: true
};

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

spsave(coreOptions, creds, fileOptions)
  .then(function(){
    console.log('saved');
  })
  .catch(function(err){
    console.log(err);
  });

@s-KaiNet
Copy link
Owner

I guess you're uploading to onedrive. In that case for folder please provide "Documents" value. It will upload a file to the root of your onedrive. "Documents/Testing" will create a subfolder and will upload to that subfolder.

@stychu
Copy link
Author

stychu commented Jun 21, 2019

Great!! It's working, thanks!

How I would also upload to the shared folder ??

@s-KaiNet
Copy link
Owner

You can upload to a shared folder if you know the exact url of a folder. Otherwise I'm not sure how to do that and have never tried.

@stychu
Copy link
Author

stychu commented Jun 21, 2019

Great! Will dig it. Thanks for this plugin great work !

@stychu stychu closed this as completed Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants