imroc / req

Simple Go HTTP client with Black Magic
https://req.cool
MIT License
4.12k stars 334 forks source link

info.FileSize empty in SetUploadCallback() when using SetFileReader() #352

Closed ManuelReschke closed 1 month ago

ManuelReschke commented 1 month ago

Hi, if i use SetFileReader() for uploading a file in combination with SetUploadCallback() the info.FileSize is always 0 / empty. Looks like its not a working combination? You have not implement this.

v3.43

imroc commented 1 month ago

Yes, it's not a working combination, cuz we can't get the file size from io.Reader interface, you should use SetFile or SetFiles

ManuelReschke commented 1 month ago

Ok then i will close this here. Thanks