From f12ff6b0e4e7c7fbf2ee93bae61a1893c733621e Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 5 Mar 2025 17:12:07 +0100 Subject: Handle diacritics in filename properly --- http/api/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http/api') diff --git a/http/api/api.py b/http/api/api.py index 51b93d1..31d331f 100644 --- a/http/api/api.py +++ b/http/api/api.py @@ -152,7 +152,7 @@ def handle_download(response, request, uri_parts=[]): content = base64.b64decode(output['content']) response.content_type = 'application/octet-stream' response.headers_out.add( - 'Content-Disposition', 'attachment; filename=%s' % (output['name'])) + 'Content-Disposition', 'attachment; filename=%s' % (output['name'].encode('utf-8'))) response.write(content) def handler(req): -- cgit v1.2.3