mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-04 00:31:12 -06:00
Trim slug in zip name
This commit is contained in:
@@ -2827,7 +2827,8 @@ class SharedLinkView(View):
|
|||||||
)
|
)
|
||||||
|
|
||||||
response = FileResponse(file_path.open("rb"), content_type="application/zip")
|
response = FileResponse(file_path.open("rb"), content_type="application/zip")
|
||||||
download_name = f"paperless-share-{share_bundle.slug}.zip"
|
short_slug = share_bundle.slug[:12]
|
||||||
|
download_name = f"paperless-share-{short_slug}.zip"
|
||||||
filename_normalized = (
|
filename_normalized = (
|
||||||
normalize("NFKD", download_name)
|
normalize("NFKD", download_name)
|
||||||
.encode(
|
.encode(
|
||||||
|
|||||||
Reference in New Issue
Block a user