durch / rust-s3

Rust library for interfacing with S3 API compatible services
MIT License
519 stars 198 forks source link

put_multipart_chunk should NOT consume the chunk parameter #375

Closed szguoxz closed 3 months ago

szguoxz commented 8 months ago

pub async fn put_multipart_chunk( &self, chunk: vec, path: &str, part_number: u32, upload_id: &str, content_type: &str, ) -> Result<Part, S3Error>

parameter chunk really should be of type &[u8] instead of a vec. This makes a big difference as if my part is 100MB, you will require 100MB more memory. use &[u8] will allow me to reuse the read buffer.

urkle commented 8 months ago

Duplicate of #351