This commit is contained in:
Xavier Fiechter 2023-02-13 01:51:28 +01:00
parent abfb467002
commit 7827f130d9

View file

@ -17,6 +17,6 @@ def stream_labels_as_jsonl(request, labelbase_id):
yield json.dumps(item) + '\n'
# Return the data as a streaming response
response = StreamingHttpResponse(generator(), content_type='application/json')
response = StreamingHttpResponse(generator(), content_type='application/jsonl')
response['Content-Disposition'] = 'attachment; filename="labelbase-{}.jsonl"'.format(labelbase_id)
return response