-
Notifications
You must be signed in to change notification settings - Fork 317
-
Notifications
You must be signed in to change notification settings - Fork 317
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
m365 file add doesn't handle zero byte file #2433
Comments
Good catch and thank you for reporting the issue @melcloud. We'll get on it asap. |
@melcloud thinking of it, what's the use case for uploading empty files? |
Mainly for testing. But in an environment we don't know whether files have content, it is easier to rely on the cli rather than doing additional file byte size check. It is fine without it, just the logic a bit odd |
Got it. Thank you for clarifying |
For empty files, we need to use another PUT-request. @waldekmastykarz Please assign to me and I will make a PR. |
Awesome! Appreciate your help @Abderahman88 👍 |
We've just released a preview version with the issue fixed. You can try it by installing the preview with |
Description
New graph API based file upload command doesn't handle empty file correctly
Steps to reproduce
Expected result
Can upload file with zero bytes
Actual result
Failed upload. If I looked at the output, the Content-Range header is set to "bytes 0--1/0". This is incorrect
Environment
m3565-beta
The text was updated successfully, but these errors were encountered: