Commit e5b3f8f1 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

Add content-disposition: attachment header to bundle download


Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent edf9c0e6
......@@ -135,6 +135,8 @@ def bundle(request, bundle_id):
def mbox(request, bundle_id):
bundle = get_object_or_404(Bundle, id = bundle_id)
response = HttpResponse(mimetype='text/plain')
response['Content-Disposition'] = 'attachment; filename=bundle-%d.mbox' % \
bundle.id
response.write(bundle.mbox())
return response
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment