Exported Course in Tutor Quince downloading as .tar instead of .tar.gz

I’m experiencing an issue with exporting courses in Tutor Quince. When I click on ‘Download Exported Course’, the file downloads as course.qxt9gap4.tar instead of the expected .tar.gz. This happens when using USER_TASKS_ARTIFACT_STORAGE = ‘storages.backends.s3boto3.S3Boto3Storage’. Has anyone encountered this before? What could be causing this, and how can I ensure it downloads in the correct format?

Thanks for any insights!

Hi @khushi! I’d like to share with you our documentation that you might find helpful as a workaround solution. This outlines the process of converting a .tar file to a .tar.gz file, which we follow whenever we encounter course import problems due to incorrect course file type.

https://public.docs.edunext.co/en/latest/external/course_creators/authoring_courses/course-import.html

Hi @annesulpico Thanks for sharing the documentation. Is this a known default issue? Is there a general solution to avoid these steps for each course export, as I’m facing this issue for every course?

Hello @khushi,

I tried in my Quince instance with USER_TASKS_ARTIFACT_STORAGE = ‘storages.backends.s3boto3.S3Boto3Storage’ and it downloads a tar.gz.

If you are using Safari, it may be decompressing downloads automatically. Please go to settings, General Settings, and make sure that “Open ‘safe’ files after downloading” is not checked.

Hi @Andres.Aulasneo I am facing this issue in Google Chrome (file downloads as .tar) and Firefox Web Browser (.tar.tar).

Hi,

Do you use a Mac? This error is very common in MacOS X, so you should disable it so that it does not automatically decompress the downloaded files.

Hi @sbernesto I checked on Ubuntu and Windows, and the issue persists on both platforms.

Actually, the exported OLX files (archived course) are in the right format, which is a tar file compressed with gzip compression. No need to convert and stuff. also the problem is not with the USER_TASKS_ARTIFACT_STORAGE: see here.
The main problem is with the exported file name which is something like this: https://bucket-name.s3-domain/org-subdomain/user_tasks/2024/12/17/course.bvloa5ug.tar.gz?ResponseContentDisposition=attachment%3B+filename%3D%22course.bvloa5ug.tar.gz%22&ResponseContentEncoding=application%2Foctet-stream&ResponseContentType=application%2Fx-tgz
So cause the file name has 3 dots there, the browser omits the last part with is gz and you see a .tar file. So it absolutely is related to how we pass the file name also the way the main s3 storage class which is storages.backends.s3boto3.S3Boto3Storage interprets this.

I will mention OpenEdx guys here hopefully they can help us or find a bug if there are any.
@kmccormick

1 Like

This is interesting. This AWS support thread makes me think that maybe we need to be setting the mime type to application/x-compressed-tar?

Actually no. The problem is with the uploaded file’s content-type on S3, application/x-tar‍‍‍. To overcome that all you have to do is upload it with application/gzip. I’m trying to find out how to change that on edx-platform, so after that I will create its PR.
Anyway thanks for your good recommendation

Great @vahidch75 . Feel free to tag me for review on your PR.