Don't encode the filename.

We fixed this for when we sand_tarballs for local but not for when we
used django storages.  This should fix the filename when we get the file
from storages.
This commit is contained in:
Feanil Patel
2019-12-20 13:30:28 -05:00
parent 7372f07cf4
commit 898df63955

View File

@@ -374,7 +374,7 @@ def export_status_handler(request, course_key_string):
if isinstance(artifact.file.storage, FileSystemStorage):
output_url = reverse_course_url('export_output_handler', course_key)
elif isinstance(artifact.file.storage, S3BotoStorage):
filename = os.path.basename(artifact.file.name).encode('utf-8')
filename = os.path.basename(artifact.file.name)
disposition = u'attachment; filename="{}"'.format(filename)
output_url = artifact.file.storage.url(artifact.file.name, response_headers={
'response-content-disposition': disposition,