openedx / openedx/frontend-app-authoring
Course Import: .tar.gz files are greyed out on file picker in Firefox
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17
- Forks
- 218
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 20
Description
When trying to import a course, after clicking the "Drag and drop your file here or click upload" button, the browser file picker doesn't allow selecting .tar.gz files by default, although the "*.tar.gz" filter appears as selected.
This only happens in Firefox, in Chrome and Safari the file picker doesn't filter out any file.
This was tested and replicated on macOS 26.5.1
Please Note: This can be worked around by changing the file picker filter to "All Files", however this can be confusing to less technical users.
Root cause analysis
This is related to the "accept" html tag that is added to the HTML input tag on the FileSection component.
The WHATWG/W3C spec defines a valid extension as a period followed by any string of characters — so .tar.gz is a valid file type specifier. Firefox, however, appears to only match against the last dot-separated segment when applying the OS-level file picker filter, causing .tar.gz files to appear greyed out/disabled even though the filter label shows *.tar.gz.
The most robust cross-browser workaround is to also accept the MIME type application/gzip (or application/x-gzip) alongside the extension, and add .gz as a fallback extension. This way Firefox's file picker will make .tar.gz files selectable (since they are .gz files):
accept={{
'application/gzip': ['.tar.gz', '.gz'],
'application/x-gzip': ['.tar.gz', '.gz'],
}}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/import-page/file-section/FileSection.tsx at the accept configuration identified in the report, then reproduce the import flow in Firefox on macOS. Verify that .tar.gz files are selectable by default in the file picker while Chrome and Safari behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100