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

Issue with script sample to upload files and folders to SharePoint #5672

Closed
joelfmrodrigues opened this issue Nov 15, 2023 · 4 comments
Closed

Comments

@joelfmrodrigues
Copy link
Contributor

Priority

(Low) Something is a little off

Description

When trying the sample script https://pnp.github.io/cli-microsoft365/sample-scripts/spo/upload-local-files-and-folder to upload files and folders to SharePoint it failed with errors related to paths.
When recursively trying to upload nested folders, the local path of the parent folder is passed as part of the parameter to construct the new SP folder path.

Steps to reproduce

Create some nested folders and files.
Try to upload to SharePoint using the script sample here: https://pnp.github.io/cli-microsoft365/sample-scripts/spo/upload-local-files-and-folder

Expected results

All files and folders are uploaded to SharePoint as per the local structure

Actual results

Script creates the first folder and then fails as the path for the first child folder is invalid

Diagnostics

No response

CLI for Microsoft 365 version

v6.11.0

nodejs version

v18

Operating system (environment)

Linux

Shell

PowerShell

cli doctor

No response

Additional Info

No response

@milanholemans
Copy link
Contributor

Thank you for bringing this up @joelfmrodrigues!

@Adam-it
Copy link
Contributor

Adam-it commented Nov 18, 2023

@joelfmrodrigues thank you for bringing this up and taking ASAP action. you rock 🤩👏

@joelfmrodrigues
Copy link
Contributor Author

@Adam-it if it helps with retesting the PR, I got this issue when using the script within WSL and also a DevOps pipeline using Ubuntu

@Adam-it
Copy link
Contributor

Adam-it commented Nov 18, 2023

@Adam-it if it helps with retesting the PR, I got this issue when using the script within WSL and also a DevOps pipeline using Ubuntu

Awesome, thanks for the tip.

@Jwaegebaert Jwaegebaert added this to the v7.2 milestone Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants