From edf7f06cdaf916ff9fca0864e14b6fbb476b641b Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 10 Feb 2023 18:18:30 +0100 Subject: Added PDF mime type --- mime.cpp | 1 + tempfile.h | 1 + 2 files changed, 2 insertions(+) diff --git a/mime.cpp b/mime.cpp index 172a004..b8367ee 100644 --- a/mime.cpp +++ b/mime.cpp @@ -27,6 +27,7 @@ std::string Reichwein::Mime::mime_type(const std::string& path) if(boost::algorithm::iequals(ext, ".jpeg")) return "image/jpeg"; if(boost::algorithm::iequals(ext, ".jpg")) return "image/jpeg"; if(boost::algorithm::iequals(ext, ".gif")) return "image/gif"; + if(boost::algorithm::iequals(ext, ".pdf")) return "application/pdf"; if(boost::algorithm::iequals(ext, ".bmp")) return "image/bmp"; if(boost::algorithm::iequals(ext, ".ico")) return "image/vnd.microsoft.icon"; if(boost::algorithm::iequals(ext, ".tiff")) return "image/tiff"; diff --git a/tempfile.h b/tempfile.h index 4f0bbc8..8bbda31 100644 --- a/tempfile.h +++ b/tempfile.h @@ -6,6 +6,7 @@ namespace Reichwein { +// removing path, recursively, via RAII class EXPORT Tempfile { std::filesystem::path m_path; -- cgit v1.2.3