def manifest_path(self): """ Get the relative URL path to the manifest. :return: The path component of the URL. :rtype: str """ return join(self.alias[0], self.repo_id, MANIFEST_FILE_NAME)
def link_unit(self, units): # Add the URL to each unit. unit, relative_path = FilePublisher.link_unit(self, units) if relative_path: url = join(self.base_url, self.alias[0], relative_path) unit['_download'] = dict(url=url) return unit, relative_path
def link(self, units): # Add the URL to each unit. links = FilePublisher.link(self, units) for unit, relative_path in links: url = join(self.base_url, self.alias[0], relative_path) unit['_download'] = dict(url=url) return links