Skip to content

m365 file add doesn't handle zero byte file #2433

@melcloud

Description

@melcloud

Description

New graph API based file upload command doesn't handle empty file correctly

Steps to reproduce

touch test.txt
m365 file add --filePath test.txt --folderUrl "https://<sharepoint>/sites/mySite/Shared Documents"
Error: The Content-Range header is missing or malformed.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions