bluetianx / BirdMessenger

DotNET client implementation of the Tus protocol for resumable file uploads.
https://tus.io/
MIT License
63 stars 12 forks source link

Support zero length uploads #57

Closed creadth closed 5 months ago

creadth commented 6 months ago

Currently if UploadLength is set to zero without setting IsUploadDeferLength to true, the library will throw an error that "UploadLength should not be less than zero", so it is not possible to upload empty files without adjusting headers with OnPreSendRequestAsync event.

bluetianx commented 6 months ago

Why do you want to set UploadLength to zero without setting IsUploadDeferLength? Can you tell me about it?

creadth commented 6 months ago

When user uploads a file with zero content, BirdMessenger is unable to process this request and fails. tus server and other libs handle this request correctly - uploading an empty file.

bluetianx commented 6 months ago

ok, I got it , I will deal with it

bluetianx commented 6 months ago

[tus-resumable-upload-protocol](https://github.com/tus/tus-resumable-upload-protocol](https://github.com/tus/tus-resumable-upload-protocol/issues/196)

bluetianx commented 5 months ago

@creadth , Upgrading BirdMessenger to 3.1.3 , Your problem will be resolved