(self, save_path, name)
| 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) |
| 657 | remote_file = self.root_path.get_by_path(path + "/" + name) |
| 658 | expiration_datetime = datetime.datetime.now( |
| 659 | tz=datetime.timezone.utc |
| 660 | ) + datetime.timedelta(hours=1) |
| 661 | expiration_datetime = expiration_datetime.strftime( |
| 662 | "%Y-%m-%dT%H:%M:%SZ") |
| 663 | permission = remote_file.create_link( |
| 664 | "view", "anonymous", expiration_datetime=expiration_datetime |
| 665 | ).execute_query() |
| 666 | return self._convert_link_to_download_link(permission.link.webUrl) |
| 667 | |
| 668 | async def get_file_response(self, file_code: FileCodes): |
| 669 | try: |
nothing calls this directly
no test coverage detected