def validate_uploaded_file_name(self, *, filename: str, upload_dir: Path) -> None:
        """Checks the file name to be valid"""

        file_path = upload_dir / filename
        if not file_path.resolve().is_relative_to(upload_dir):
            raise UploadedFileError
Checks the file name to be valid
cvat/apps/engine/mixins.py