mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-24 02:02:23 -04:00
Re-add fix from #9599
This commit is contained in:
parent
8cfa9061d4
commit
e628c488cf
@ -2774,10 +2774,14 @@ def serve_file(*, doc: Document, use_archive: bool, disposition: str):
|
|||||||
# 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
|
||||||
# Chromium cannot handle commas in the filename
|
# Chromium cannot handle commas in the filename
|
||||||
filename_normalized = normalize("NFKD", filename.replace(",", "_")).encode(
|
filename_normalized = (
|
||||||
|
normalize("NFKD", filename.replace(",", "_"))
|
||||||
|
.encode(
|
||||||
"ascii",
|
"ascii",
|
||||||
"ignore",
|
"ignore",
|
||||||
)
|
)
|
||||||
|
.decode("ascii")
|
||||||
|
)
|
||||||
filename_encoded = quote(filename)
|
filename_encoded = quote(filename)
|
||||||
content_disposition = (
|
content_disposition = (
|
||||||
f"{disposition}; "
|
f"{disposition}; "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user