Bug: MinIO webhook returns 400 - Missing contentType in payload
Environment
- Deployment: Docker Compose
- Version: latest (lasuite/meet-backend:latest)
- MinIO version: RELEASE.2025-09-07T16-13-09Z
Description
The MinIO webhook integration for recordings fails with 400 Bad Request because the MinioParser expects a contentType field that MinIO doesn't always send in webhook payloads.
Configuration
# env.d/common
RECORDING_ENABLE=True
RECORDING_STORAGE_EVENT_ENABLE=True
RECORDING_ENABLE_STORAGE_EVENT_AUTH=False
RECORDING_EVENT_PARSER_CLASS=core.recording.event.parsers.MinioParser
Error
ParsingEventDataError: "Missing or malformed key: 'contentType'."
Root Cause
In core/recording/event/parsers.py, line ~95:
filetype = file_object["contentType"] # This key is not always present
MinIO webhook payloads don't always include contentType, especially for programmatically uploaded files.
Proposed Solution
Make contentType optional and infer from file extension:
if "contentType" in file_object:
filetype = file_object["contentType"]
else:
# Infer from extension
if filepath.endswith('.mp4'):
filetype = "video/mp4"
elif filepath.endswith('.ogg'):
filetype = "audio/ogg"
Workaround
Created a custom parser that handles missing contentType.
Bug: MinIO webhook returns 400 - Missing contentType in payload
Environment
Description
The MinIO webhook integration for recordings fails with 400 Bad Request because the
MinioParserexpects acontentTypefield that MinIO doesn't always send in webhook payloads.Configuration
Error
Root Cause
In
core/recording/event/parsers.py, line ~95:MinIO webhook payloads don't always include
contentType, especially for programmatically uploaded files.Proposed Solution
Make
contentTypeoptional and infer from file extension:Workaround
Created a custom parser that handles missing contentType.