Пример #1
0
    def direct_api_url(self, content_share: ContentShare) -> str:
        content_api = ContentApi(
            config=self._config, session=self._session, current_user=self._user
        )
        content = content_api.get_one(
            content_id=content_share.content_id, content_type=content_type_list.Any_SLUG
        )

        return PUBLIC_API_SHARED_CONTENT_LINK_PATTERN.format(
            api_base_url=self._config.WEBSITE__BASE_URL,
            base_public_api=BASE_PUBLIC_API,
            share_token=content_share.share_token,
            filename=quote(core_convert_file_name_to_display(content.file_name)),
        )
Пример #2
0
 def filename(self) -> str:
     """
     :return: complete filename with both label and file extension part
     """
     return core_convert_file_name_to_display(self.revision.file_name)
Пример #3
0
 def filename(self) -> str:
     """
     :return: complete filename with both label and file extension part
     """
     return core_convert_file_name_to_display(self.content.file_name)