Open ybdx opened 8 months ago
@ybdx Thanks for reporting it; I will analyze it.
@ybdx I know this issue is aged. I'm sorry for getting back late. I wanted to check whether https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetRetryResetReaders has addressed your usage. This option enables Resty to reset the reader if io.ReadSeeker is supported.
Below is the SetFileReader function code
When we first use the reader to read content, the reader current index will move to the end. When we retry it again, the current index is in the end, we will lost the content from the start to the end. This means the second time we read the content is empty.