From d8ad7a743e7a8d3f1dc175697099a755ca6054a2 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Thu, 12 Mar 2026 14:26:03 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(backend)=20align=20recording?= =?UTF-8?q?=20file=20regex=20with=20MEDIA=5FURL-based=20pattern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initially I avoided coupling the recording path regex with the setting that provides the Django static URL. However the new file viewset already relies on it, and Drive does as well. For consistency, update the recording regex to use the same STATIC_URL-based approach. While the coupling may not feel ideal, having two different regex strategies for similar file paths would be worse. --- src/backend/core/enums.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/core/enums.py b/src/backend/core/enums.py index 9f7e237a..0f95e0a5 100644 --- a/src/backend/core/enums.py +++ b/src/backend/core/enums.py @@ -14,7 +14,7 @@ FILE_EXT_REGEX = r"[a-zA-Z0-9]{1,10}" # pylint: disable=line-too-long RECORDING_STORAGE_URL_PATTERN = re.compile( - f"/media/{settings.RECORDING_OUTPUT_FOLDER}/(?P{UUID_REGEX:s}).(?P{FILE_EXT_REGEX:s})" + f"{settings.MEDIA_URL:s}{settings.RECORDING_OUTPUT_FOLDER}/(?P{UUID_REGEX:s}).(?P{FILE_EXT_REGEX:s})" ) MEDIA_STORAGE_URL_PATTERN = re.compile(