From da10b5c1c9cc2cc9dbd64fec2457af782805b14e Mon Sep 17 00:00:00 2001 From: phiresky Date: Wed, 8 Apr 2020 12:33:48 +0200 Subject: [PATCH] allow mime type matching for pdf (#39) --- src/adapters/pdfpages.rs | 4 +++- src/adapters/poppler.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/adapters/pdfpages.rs b/src/adapters/pdfpages.rs index 286c16d..f3ec0e9 100644 --- a/src/adapters/pdfpages.rs +++ b/src/adapters/pdfpages.rs @@ -20,7 +20,9 @@ lazy_static! { .iter() .map(|s| FastMatcher::FileExtension(s.to_string())) .collect(), - slow_matchers: None + slow_matchers: Some(vec![SlowMatcher::MimeType( + "application/pdf".to_owned() + )]) }; } #[derive(Default)] diff --git a/src/adapters/poppler.rs b/src/adapters/poppler.rs index c73a7ee..6be887c 100644 --- a/src/adapters/poppler.rs +++ b/src/adapters/poppler.rs @@ -17,7 +17,9 @@ lazy_static! { .iter() .map(|s| FastMatcher::FileExtension(s.to_string())) .collect(), - slow_matchers: None + slow_matchers: Some(vec![SlowMatcher::MimeType( + "application/pdf".to_owned() + )]) }; } #[derive(Default)]