From: Kexogg <65514050+Kexogg@users.noreply.github.com> Date: Tue, 31 Jan 2023 19:33:06 +0000 (+0500) Subject: Fix importing files with non-ascii names (#2555) X-Git-Tag: v1.13.0~1^2~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dae4550bc376044ef49eddd148dc0c968969f32c;p=thirdparty%2Fpaperless-ngx.git Fix importing files with non-ascii names (#2555) --- diff --git a/src/paperless_tika/parsers.py b/src/paperless_tika/parsers.py index f34ecbbabe..39ab75d793 100644 --- a/src/paperless_tika/parsers.py +++ b/src/paperless_tika/parsers.py @@ -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, ), }