feat: enhance media upload handling and MIME type resolution
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 25s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 7s
Test Suite / playwright-tests (push) Successful in 24s

- Expanded the allowed upload MIME types to include HEIC, HEIF, and QuickTime formats.
- Introduced a new function to resolve MIME types based on file content, filename extensions, and client-provided content types.
- Updated media upload logic in both the exercises and media assets routers to utilize the new MIME resolution function.
- Adjusted frontend file input accept attributes to allow broader media types, improving user experience.
- Enhanced media library components to handle HEIC/HEIF formats with appropriate fallback messaging for browser compatibility.
This commit is contained in:
Lars committed 2026-05-07 21:55:22 +02:00
1 parent d213746bd2
commit cc4e621f95
5 files changed
+109 -17

No files matched your search

+1 -1
View File
@@ -1460,7 +1460,7 @@ function ExerciseFormPage() {
<label className="form-label">Datei</label>
<input
type="file"
accept="image/jpeg,image/png,image/gif,video/mp4,application/pdf"
accept="image/*,video/*,application/pdf"
onChange={(e) => setMediaFile(e.target.files?.[0] || null)}
/>
<div className="form-row" style={{ marginTop: '8px' }}>