mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-04-05 20:51:26 +00:00
feat: Finalisation formulaire dynamique
This commit is contained in:
@ -137,6 +137,12 @@ class ServeFileView(APIView):
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
|
||||
# Nettoyer les prefixes media usuels si presents
|
||||
if file_path.startswith('/media/'):
|
||||
file_path = file_path[len('/media/'):]
|
||||
elif file_path.startswith('media/'):
|
||||
file_path = file_path[len('media/'):]
|
||||
|
||||
# Nettoyer le préfixe /data/ si présent
|
||||
if file_path.startswith('/data/'):
|
||||
file_path = file_path[len('/data/'):]
|
||||
|
||||
Reference in New Issue
Block a user