- Shipped
- September 23, 2026 at 8:20 AM UTC
- Author
- Kamo
- Commit
- 503e13a
Every audio upload but MP3 was refused as a MIME mismatch. An upload is accepted only when the browser's type and Tika's sniff resolve to the same ImageMimeType, and for audio the two sides never spell a format the same way. Measured against Tika 2.9.2: a WAV sniffs as audio/vnd.wave (browsers send audio/wav), Ogg as audio/vorbis or audio/opus (audio/ogg), ADTS AAC as audio/x-aac (audio/aac), and Windows and macOS send an .m4a as audio/x-m4a where Tika says audio/mp4. stringToImageMimeType now ignores case, surrounding space and parameters, and maps those aliases onto the constant they name. Nothing maps a container that can carry video (Matroska, WebM, MP4) to an audio constant, and FLAC stays a generic binary on both sides, as before. TrainingSlide and TrainingVersionSlide gain media_meta_json (TEXT): the duration, waveform peaks and chapter marks the training player navigates an audio lesson by — written by the editor, frozen with the version. DDL, applied to production by hand before this commit (InitializerService is not deployed): ALTER TABLE public.hr_training_slide ADD COLUMN IF NOT EXISTS media_meta_json TEXT; ALTER TABLE **************** ADD COLUMN IF NOT EXISTS media_meta_json TEXT;
