python3 compatibility
This commit is contained in:
Ayub khan
2019-09-30 16:53:03 +05:00
parent 2de3667c85
commit c29b7520a1

View File

@@ -534,7 +534,12 @@ class VideoStudioViewHandlers(object):
video=self, lang=language, output_format=Transcript.SRT
)
response = Response(transcript_content, headerlist=[
('Content-Disposition', 'attachment; filename="{}"'.format(transcript_name.encode('utf8'))),
(
'Content-Disposition',
'attachment; filename="{}"'.format(
transcript_name.encode('utf8') if six.PY2 else transcript_name
)
),
('Content-Language', language),
('Content-Type', mime_type)
])