From ad6ef7314baa08ea12506c452119f3442a42a102 Mon Sep 17 00:00:00 2001
From: Jens van Almsick <bin101@binary101.de>
Date: Sun, 2 Oct 2022 18:09:37 +0100
Subject: [PATCH] fix: csv recognition by consumer

paperless-ngx detects the file format via the mime-type based on the response of python-magic which rely on the response of the file command.
In version 5.39 (which is shipped with debian bullseye and I think many more non-rolling distributions) of the file command a *.csv will be detected as "application/csv" instead of "text/csv" as in newer versions.
---
 src/paperless_text/signals.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/paperless_text/signals.py b/src/paperless_text/signals.py
index 3d025c14e..94d1ccc2e 100644
--- a/src/paperless_text/signals.py
+++ b/src/paperless_text/signals.py
@@ -11,5 +11,6 @@ def text_consumer_declaration(sender, **kwargs):
         "mime_types": {
             "text/plain": ".txt",
             "text/csv": ".csv",
+            "application/csv": ".csv",
         },
     }