mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 08:37:19 +01:00
checking file types against parsers in the consumer.
This commit is contained in:
parent
b0c8ade241
commit
834352130c
5 changed files with 127 additions and 113 deletions
|
|
@ -54,6 +54,13 @@ def get_default_file_extension(mime_type):
|
|||
return None
|
||||
|
||||
|
||||
def is_file_ext_supported(ext):
|
||||
if ext:
|
||||
return ext.lower() in get_supported_file_extensions()
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def get_supported_file_extensions():
|
||||
extensions = set()
|
||||
for response in document_consumer_declaration.send(None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue