mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
Merge pull request #599 from stumpylog/minor-bug-fixes
Fixes downloaded filename, add more consumer ignore settings
This commit is contained in:
commit
47dae716ae
@ -671,7 +671,7 @@ PAPERLESS_CONSUMER_IGNORE_PATTERNS=<json>
|
|||||||
|
|
||||||
This can be adjusted by configuring a custom json array with patterns to exclude.
|
This can be adjusted by configuring a custom json array with patterns to exclude.
|
||||||
|
|
||||||
Defautls to ``[".DS_STORE/*", "._*", ".stfolder/*"]``.
|
Defaults to ``[".DS_STORE/*", "._*", ".stfolder/*", ".stversions/*", ".localized/*", "desktop.ini"]``.
|
||||||
|
|
||||||
Binaries
|
Binaries
|
||||||
########
|
########
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
#PAPERLESS_CONSUMER_POLLING=10
|
#PAPERLESS_CONSUMER_POLLING=10
|
||||||
#PAPERLESS_CONSUMER_DELETE_DUPLICATES=false
|
#PAPERLESS_CONSUMER_DELETE_DUPLICATES=false
|
||||||
#PAPERLESS_CONSUMER_RECURSIVE=false
|
#PAPERLESS_CONSUMER_RECURSIVE=false
|
||||||
#PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*"]
|
#PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*", ".stversions/*", ".localized/*", "desktop.ini"]
|
||||||
#PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=false
|
#PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=false
|
||||||
#PAPERLESS_OPTIMIZE_THUMBNAILS=true
|
#PAPERLESS_OPTIMIZE_THUMBNAILS=true
|
||||||
#PAPERLESS_PRE_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh
|
#PAPERLESS_PRE_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh
|
||||||
|
@ -6,7 +6,7 @@ import zipfile
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from time import mktime
|
from time import mktime
|
||||||
from unicodedata import normalize
|
from unicodedata import normalize
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db.models import Case
|
from django.db.models import Case
|
||||||
@ -244,7 +244,7 @@ class DocumentViewSet(
|
|||||||
# RFC 5987 addresses this issue
|
# RFC 5987 addresses this issue
|
||||||
# see https://datatracker.ietf.org/doc/html/rfc5987#section-4.2
|
# see https://datatracker.ietf.org/doc/html/rfc5987#section-4.2
|
||||||
filename_normalized = normalize("NFKD", filename).encode("ascii", "ignore")
|
filename_normalized = normalize("NFKD", filename).encode("ascii", "ignore")
|
||||||
filename_encoded = quote_plus(filename)
|
filename_encoded = quote(filename)
|
||||||
content_disposition = (
|
content_disposition = (
|
||||||
f"{disposition}; "
|
f"{disposition}; "
|
||||||
f'filename="{filename_normalized}"; '
|
f'filename="{filename_normalized}"; '
|
||||||
|
@ -455,7 +455,7 @@ CONSUMER_IGNORE_PATTERNS = list(
|
|||||||
json.loads(
|
json.loads(
|
||||||
os.getenv(
|
os.getenv(
|
||||||
"PAPERLESS_CONSUMER_IGNORE_PATTERNS",
|
"PAPERLESS_CONSUMER_IGNORE_PATTERNS",
|
||||||
'[".DS_STORE/*", "._*", ".stfolder/*"]',
|
'[".DS_STORE/*", "._*", ".stfolder/*", ".stversions/*", ".localized/*", "desktop.ini"]',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user