From 0c6163d822591e5cdc698d12badcf6afe9324346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Casta=C3=B1o=20Arteaga?= Date: Mon, 15 Apr 2024 10:53:41 +0200 Subject: [PATCH] Do not raise errors detecting mime type on deploy (#573) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sergio CastaƱo Arteaga --- src/deploy/s3.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/deploy/s3.rs b/src/deploy/s3.rs index 70520265..dbac9d10 100644 --- a/src/deploy/s3.rs +++ b/src/deploy/s3.rs @@ -168,9 +168,7 @@ async fn upload_objects( // Prepare object's body and content type let body = ByteStream::from_path(file).await?; - let content_type = mime_guess::from_path(&key) - .first() - .ok_or(format_err!("cannot detect content type of key: {})", &key))?; + let content_type = mime_guess::from_path(&key).first().unwrap_or(mime::APPLICATION_OCTET_STREAM); // Upload file s3_client