spo folder copy#706
Conversation
|
Thank you! I'll review it shortly |
waldekmastykarz
left a comment
There was a problem hiding this comment.
When trying to use the command, I'm getting a File not found error.
Repro:
spo folder copy -u https://contoso.sharepoint.com/sites/marketing -s Shared%20Documents/Folder11 -t /sites/salesIt seems that the command generated invalid URL in the CreateCopyJobs payload:
CreateCopyJobs request...
body : {"exportObjectUris":["https://contoso.sharepoint.com/sites/Shared%20Documents/Folder11"],"destinationUri":"https://contoso.sharepoint.com/sites/sales","options":{"AllowSchemaMismatch":false,"IgnoreVersionHistory":true}}
headers: {"authorization":"Bearer eyJ0eXAiOiJKV1QiLCJhbGc...","accept":"application/json;odata=nometadata","User-Agent":"NONISV|SharePointPnP|Office365CLI/1.11.0"}
json : true
url : https://contoso.sharepoint.com/sites/marketing/_api/site/CreateCopyJobs
I also tried running
spo folder copy -u https://contoso.sharepoint.com/sites/marketing -s /Shared%20Documents/Folder11 -t /sites/salesand
spo folder copy -u https://contoso.sharepoint.com/sites/marketing -s "Shared Documents/Folder11" -t /sites/salesBut in all cases I'm getting the same error
waldekmastykarz
left a comment
There was a problem hiding this comment.
Nicely done with a few issues I've fixed when merging the PR
| webUrl: string; | ||
| sourceUrl: string; | ||
| targetUrl: string; | ||
| allowSchemaMismatch: boolean; |
There was a problem hiding this comment.
allowSchemaMismatch should be optional
| ``` | ||
|
|
||
| Copies folder to a document library in another site collection. Allow for schema mismatch | ||
| ```sh |
There was a problem hiding this comment.
There should be an empty line between text and a code block. Additionally, the code block shouldn't be indented.
| `-u, --webUrl <webUrl>`|The URL of the site where the folder is located | ||
| `-s, --sourceUrl <sourceUrl>`|Site-relative URL of the folder to copy | ||
| `-t, --targetUrl <targetUrl>`|Server-relative URL where to copy the folder | ||
| `--allowSchemaMismatch`|Ignores any missing fields in the target destination and copies the folder anyway |
There was a problem hiding this comment.
Doesn't match the option description in the command
| `-u, --webUrl <webUrl>`|The URL of the site where the folder is located | ||
| `-s, --sourceUrl <sourceUrl>`|Site-relative URL of the folder to copy | ||
| `-t, --targetUrl <targetUrl>`|Server-relative URL where to copy the folder | ||
| `--allowSchemaMismatch`|Ignores any missing fields in the target destination and copies the folder anyway |
There was a problem hiding this comment.
target and destination are the same thing. No need to mention them both in one sentence
|
Merged manually. Thanks! |
Made a few changes to match the changes made in
spo file moveandspo folder move