From a9ae4c57e5ffcb151e9a59aae9170c20358d5b4f Mon Sep 17 00:00:00 2001 From: melvinsoft Date: Wed, 25 Mar 2020 16:16:28 -0300 Subject: [PATCH 1/2] removed obsolete parameter in boto3 --- cms/djangoapps/contentstore/views/import_export.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index 067411b15105..f8422586ea91 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -376,11 +376,7 @@ def export_status_handler(request, course_key_string): elif isinstance(artifact.file.storage, S3Boto3Storage): filename = os.path.basename(artifact.file.name).encode('utf-8') disposition = 'attachment; filename="{}"'.format(filename) - output_url = artifact.file.storage.url(artifact.file.name, response_headers={ - 'response-content-disposition': disposition, - 'response-content-encoding': 'application/octet-stream', - 'response-content-type': 'application/x-tgz' - }) + output_url = artifact.file.storage.url(artifact.file.name) else: output_url = artifact.file.storage.url(artifact.file.name) elif task_status.state in (UserTaskStatus.FAILED, UserTaskStatus.CANCELED): From 65db8a5f043587158c6c5895ba9172fb927bc6c8 Mon Sep 17 00:00:00 2001 From: melvinsoft Date: Wed, 25 Mar 2020 17:13:09 -0300 Subject: [PATCH 2/2] remove unused vars --- cms/djangoapps/contentstore/views/import_export.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cms/djangoapps/contentstore/views/import_export.py b/cms/djangoapps/contentstore/views/import_export.py index f8422586ea91..f29267bec7ad 100644 --- a/cms/djangoapps/contentstore/views/import_export.py +++ b/cms/djangoapps/contentstore/views/import_export.py @@ -374,8 +374,6 @@ 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, S3Boto3Storage): - filename = os.path.basename(artifact.file.name).encode('utf-8') - disposition = 'attachment; filename="{}"'.format(filename) output_url = artifact.file.storage.url(artifact.file.name) else: output_url = artifact.file.storage.url(artifact.file.name)