Describe the bug
Although the multipart writer implements AsyncWrite, it is incompatible with the utility tokio::io::copy function in tokio.
The reason seems to be the copy function in tokio polls flush frequently (https://docs.rs/tokio/1.23.0/src/tokio/io/util/copy.rs.html#99). However, in this case, each call to flush will cause put_multipart_part request to be sent.
To Reproduce
Expected behavior
Additional context
Describe the bug
Although the multipart writer implements AsyncWrite, it is incompatible with the utility
tokio::io::copyfunction in tokio.The reason seems to be the copy function in tokio polls flush frequently (https://docs.rs/tokio/1.23.0/src/tokio/io/util/copy.rs.html#99). However, in this case, each call to flush will cause
put_multipart_partrequest to be sent.To Reproduce
Expected behavior
Additional context