MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / _convert_link_to_download_link

Method _convert_link_to_download_link

core/storage.py:649–653  ·  view source on GitHub ↗
(self, link)

Source from the content-addressed store, hash-verified

647 await asyncio.to_thread(self._delete, await file_code.get_file_path())
648
649 def _convert_link_to_download_link(self, link):
650 p1 = re.search(r"https://(.+)\.sharepoint\.com", link).group(1)
651 p2 = re.search(r"personal/(.+)/", link).group(1)
652 p3 = re.search(rf"{p2}/(.+)", link).group(1)
653 return f"https://{p1}.sharepoint.com/personal/{p2}/_layouts/52/download.aspx?share={p3}"
654
655 def _get_file_url(self, save_path, name):
656 path = self._get_path_str(save_path)

Callers 1

_get_file_urlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected