Specify text vs binary mode for opening files.
[htsworkflow.git] / experiments / views.py
index e5f675da42454868a24197a5f9109a6c4e1ede77..7d30bbeb19d337da8ce3b5f2af57422b640da49b 100644 (file)
@@ -176,7 +176,7 @@ def read_result_file(self, key):
         content_type = data_file.file_type.mimetype
 
     if os.path.exists(data_file.pathname):
-        return HttpResponse(open(data_file.pathname,'r'),
+        return HttpResponse(open(data_file.pathname,'rb'),
                             content_type=content_type)
 
     raise Http404