refactor: update media handling configuration and improve upload acceptance
Deploy Development / deploy (push) Successful in 38s
Test Suite / pytest-backend (push) Successful in 25s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 8s
Test Suite / playwright-tests (push) Failing after 1m45s

- Modified .env.example to include SHINKAN_MEDIA_HOST and MEDIA_ROOT for better media path management.
- Updated docker-compose files to utilize SHINKAN_MEDIA_HOST for volume mounts, ensuring consistent media directory handling across environments.
- Enhanced ExerciseFormPage and MediaLibraryPage to specify accepted media types explicitly, improving compatibility and user experience during uploads.
This commit is contained in:
Lars committed 2026-05-08 08:35:15 +02:00
1 parent ceef6f09e2
commit c921f0dd8f
5 files changed
+30 -20

No files matched your search

+5 -1
View File
@@ -6,6 +6,10 @@ import RichTextEditor from '../components/RichTextEditor'
import ExerciseProgressionGraphPanel from '../components/ExerciseProgressionGraphPanel'
import { SKILL_LEVEL_OPTIONS, normalizeSkillLevelSlug } from '../constants/skillLevels'
/** Kein image/*/video/* — WebKit (iOS) ist damit oft kaputt. */
const EXERCISE_MEDIA_UPLOAD_ACCEPT =
'image/jpeg,image/png,image/gif,image/heic,image/heif,video/mp4,video/quicktime,application/pdf,.jpg,.jpeg,.png,.gif,.heic,.heif,.mp4,.mov,.pdf'
/** Kachelvorschau: Video nutzt ersten Frame (metadata), Bild = img. */
function ExerciseMediaThumbTile({ exerciseId, media, onOpenPreview }) {
const src = !media.embed_url ? resolveExerciseMediaFileUrl(exerciseId, media) : null
@@ -1460,7 +1464,7 @@ function ExerciseFormPage() {
<label className="form-label">Datei</label>
<input
type="file"
accept="image/*,video/*,application/pdf"
accept={EXERCISE_MEDIA_UPLOAD_ACCEPT}
onChange={(e) => setMediaFile(e.target.files?.[0] || null)}
/>
<div className="form-row" style={{ marginTop: '8px' }}>