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?
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.
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?
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.
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
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