Skip to content

Commit

Permalink
Do not raise errors detecting mime type on deploy (#573)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
  • Loading branch information
tegioz authored Apr 15, 2024
1 parent 1eedeff commit 0c6163d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/deploy/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c6163d

Please sign in to comment.