mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-03 20:19:52 +01: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
4 changed files with 5 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ import zipfile
|
|||
from datetime import datetime
|
||||
from time import mktime
|
||||
from unicodedata import normalize
|
||||
from urllib.parse import quote_plus
|
||||
from urllib.parse import quote
|
||||
|
||||
from django.conf import settings
|
||||
from django.db.models import Case
|
||||
|
|
@ -244,7 +244,7 @@ class DocumentViewSet(
|
|||
# RFC 5987 addresses this issue
|
||||
# see https://datatracker.ietf.org/doc/html/rfc5987#section-4.2
|
||||
filename_normalized = normalize("NFKD", filename).encode("ascii", "ignore")
|
||||
filename_encoded = quote_plus(filename)
|
||||
filename_encoded = quote(filename)
|
||||
content_disposition = (
|
||||
f"{disposition}; "
|
||||
f'filename="{filename_normalized}"; '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue