def direct_send_file(
        self,
        path: Path,
        user_ids: List[int] = [],
        thread_ids: List[int] = [],
        content_type: str = "photo",
    ) -> DirectMessage:
        """
        Send a direct file to list of users or threads

        Parameters
        ----------
        path: Path
            Path to file that will be posted on the thread
        user_ids: List[int]
            List of unique identifier of Users id
        thread_ids: List[int]
            List of unique identifier of Direct Message thread id

        Returns
        -------
        DirectMessage
            An object of DirectMessage
        """
        assert self.user_id, "Login required"
        assert (user_ids or thread_ids) and not (
            user_ids and thread_ids
        ), "Specify user_ids or thread_ids, but not both"
        method = f"configure_{content_type}"
        token = self.generate_mutation_token()
        nav_chains = [
            (
                "6xQ:direct_media_picker_photos_fragment:1,5rG:direct_thread:2,"
                "5ME:direct_quick_camera_fragment:3,5ME:direct_quick_camera_fragment:4,"
                "4ju:reel_composer_preview:5,5rG:direct_thread:6,5rG:direct_thread:7,"
                "6xQ:direct_media_picker_photos_fragment:8,5rG:direct_thread:9"
            ),
            (
                "1qT:feed_timeline:1,7Az:direct_inbox:2,7Az:direct_inbox:3,"
                "5rG:direct_thread:4,6xQ:direct_media_picker_photos_fragment:5,"
                "5rG:direct_thread:6,5rG:direct_thread:7,"
                "6xQ:direct_media_picker_photos_fragment:8,5rG:direct_thread:9"
            ),
        ]
        kwargs = {}
        data = {
            "action": "send_item",
            "is_shh_mode": "0",
            "send_attribution": "direct_thread",
            "client_context": token,
            "mutation_token": token,
            "nav_chain": random.choices(nav_chains),
            "offline_threading_id": token,
        }
        if content_type == "video":
            data["video_result"] = ""
            kwargs["to_direct"] = True
        if content_type == "photo":
            data["send_attribution"] = "inbox"
            data["allow_full_aspect_ratio"] = "true"
        if user_ids:
            data["recipient_users"] = dumps([[int(uid) for uid in user_ids]])
        if thread_ids:
            data["thread_ids"] = dumps([int(tid) for tid in thread_ids])
        path = Path(path)
        upload_id = str(int(time.time() * 1000))
        upload_id, width, height = getattr(self, f"{content_type}_rupload")(
            path, upload_id, **kwargs
        )[:3]
        data["upload_id"] = upload_id
        # data['content_type'] = content_type
        result = self.private_request(
            f"direct_v2/threads/broadcast/{method}/",
            data=self.with_default_data(data),
            with_signature=False,
        )
        return extract_direct_message(result["payload"])

        Send a direct file to list of users or threads

        Parameters
        ----------
        path: Path
            Path to file that will be posted on the thread
        user_ids: List[int]
            List of unique identifier of Users id
        thread_ids: List[int]
            List of unique identifier of Direct Message thread id

        Returns
        -------
        DirectMessage
            An object of DirectMessage
        
instagrapi/mixins/direct.py