X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/9e7f72dcee48e4ced62061b559db75dcf9b79694..583f4d519b134720024e4fa387b5a00561bd00cf:/src/archive/views.py?ds=sidebyside diff --git a/src/archive/views.py b/src/archive/views.py index fc3a7e5..8621f64 100644 --- a/src/archive/views.py +++ b/src/archive/views.py @@ -3,7 +3,7 @@ from datetime import datetime import os import os.path -from urllib import quote +from urllib.parse import quote from archive import settings from django.contrib.auth import logout @@ -198,7 +198,7 @@ def download(request, aid, which="source"): if not file_: raise Http404 ext = file_.path.rsplit('.', 1)[-1] - response = HttpResponse(mimetype='application/force-download') + response = HttpResponse(content_type='application/force-download') response['Content-Disposition'] = "attachment; filename*=UTF-8''%s.%s" % ( quote(audiobook.title.encode('utf-8'), safe=''), ext)