-
Notifications
You must be signed in to change notification settings - Fork 307
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
spo file add
: A file or folder with the name already exists
#6011
Comments
spo file add
: A file or folder with the name already exists
Thanks for rising the issue. We will look into it ASAP |
Hi @MartinLoeper, how large is the file you are trying to add? Is it over 250MB? |
Hi @MartinLoeper, could you give some more details about what you are trying to achieve with what kind of file? Seems like I can't reproduce this error. While looking at the command, I found some other issues as well:
Already made a fix for these issues, if I can reproduce the issue, I'll update the PR with that fix as well. |
It's about 35 kB. So no, not nearly 250 MB |
Do you think your changes already solve the issue? Should I give it a try by checking out your PR? Thanks for looking into this so quickly!! 🚀 |
We are basically sharing an encrypted file in sharepoint. So my usecase is to download the file, edit it and to upload it again. I am currently automating this workflow using m365 cli and the following commands: |
Thank you for giving a bit more context. This is how I tested the command (in PowerShell): m365 spo file add -u $webUrl --folder "/Testlib" --checkOut --checkInComment "Lorem ipsum dolor sit amet" --path $filePath And this is giving me this as a result (I executed it a few times):
If you provide the |
Please do! I'm a bit in doubt if this will fix your issue, but we can always try. Are you familiar with testing PRs locally, or should I provide some help? |
I just checked out your branch and ran my command using Thanks for leading me into the right direction @milanholemans! |
Aw, I see, so that means your issue is fixed now? If that's the case, I can have a look at it so we throw a clearer error instead of this misleading one. |
@MartinLoeper did you by any chance had the time to answer my previous comment? |
Not yet sorry, I am OOO this week and back next Monday. |
@MartinLoeper if you have some time in the coming days, please could you verify my previous comment? |
Looks like my issue is fixed now. I think this issue can be closed :)
If you have any idea how to do that, it would be immensely helpful for people like me who misuse the cli :D |
Priority
(Urgent) I can't use the CLI
Description
I want to replace a remote sharepoint file using the
spo file add
command, but the server complains that the file already exists.Steps to reproduce
Expected results
The file should be replaced. Since it is versioned, a new version should be added.
Actual results
aka "file already exists".
Diagnostics
No response
CLI for Microsoft 365 version
v7.6.0
nodejs version
20.11.1
Operating system (environment)
Linux
Shell
zsh
cli doctor
No response
Additional Info
No response
Updated spec
Seems like the error thrown was by design by the API.
While looking at the command, I found some other issues as well:
--folder "/Shared Documents"
.The text was updated successfully, but these errors were encountered: