]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix importing files with non-ascii names (#2555)
authorKexogg <65514050+Kexogg@users.noreply.github.com>
Tue, 31 Jan 2023 19:33:06 +0000 (00:33 +0500)
committerGitHub <noreply@github.com>
Tue, 31 Jan 2023 19:33:06 +0000 (11:33 -0800)
src/paperless_tika/parsers.py

index f34ecbbabe67d5c538c0ba97bfb5381ab4d70861..39ab75d7938452ed1ac983f6ad654ec5bd6f9924 100644 (file)
@@ -90,7 +90,7 @@ class TikaDocumentParser(DocumentParser):
         with open(document_path, "rb") as document_handle:
             files = {
                 "files": (
-                    file_name or os.path.basename(document_path),
+                    "convert" + os.path.splitext(document_path)[-1],
                     document_handle,
                 ),
             }