Enhances 'spo file add' with additional options and response#7099
Merged
Enhances 'spo file add' with additional options and response#7099
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the spo file add command by adding two new options (overwrite and fileName) and making the command return response data instead of producing no output. The overwrite option defaults to true to maintain backward compatibility, while fileName allows users to specify a custom name for the uploaded file.
Key changes:
- Added
overwriteandfileNameoptions to provide more control over file uploads - Modified command to return file metadata response object after upload
- Updated documentation to include new options, permissions table, and response examples
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/m365/spo/commands/file/file-add.ts | Added overwrite and fileName options, implemented file existence check logic, and updated command to return upload response |
| src/m365/spo/commands/file/file-add.spec.ts | Added tests for new options and updated existing tests to verify response output |
| docs/docs/cmd/spo/file/file-add.mdx | Documented new options, added permissions table, and provided comprehensive response examples across all output formats |
552778f to
0b997c2
Compare
0b997c2 to
745757f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4691
Remarks
Added two extra options,
overwriteandfileName, for convenience. Overwrite is by defaulttrueto avoid breaking changes.