From ea3de75258d9e1791d17d281c07c5f9c449c8841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Surkont?= Date: Sun, 15 Oct 2023 22:06:18 +0200 Subject: [PATCH] Fix put_object_stream sync for small files (#357) Closes #342 --- s3/src/bucket.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3/src/bucket.rs b/s3/src/bucket.rs index eb2c1a1342..61f4a02cfa 100644 --- a/s3/src/bucket.rs +++ b/s3/src/bucket.rs @@ -1190,7 +1190,7 @@ impl Bucket { // Files is not big enough for multipart upload, going with regular put_object self.abort_upload(&path, upload_id)?; - self.put_object(s3_path, chunk.as_slice())?; + return Ok(self.put_object(s3_path, chunk.as_slice())?.status_code()); } else { part_number += 1; let part = self.put_multipart_chunk(