mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-17 14:07:49 +00:00
♻️(backend) refactor uploaded file's key format
Remove the user-provided filename while preserving the extension, and switch to the format `uuid.extension`. This is more natural than the previous `uuid/.extension` format and avoids confusion. Update related tests accordingly.
This commit is contained in:
committed by
Florent Chehab
parent
342f992556
commit
f57db0acc8
@@ -85,7 +85,7 @@ UUID_REGEX = (
|
||||
FILE_EXT_REGEX = r"[\d\w]+"
|
||||
MEDIA_STORAGE_URL_PATTERN = re.compile(
|
||||
f"{settings.MEDIA_URL:s}"
|
||||
rf"(?P<key>{FILE_FOLDER:s}/(?P<pk>{UUID_REGEX:s})/\.{FILE_EXT_REGEX:s})$"
|
||||
rf"(?P<key>{FILE_FOLDER:s}/(?P<pk>{UUID_REGEX:s})\.{FILE_EXT_REGEX:s})$"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user