【问题标题】:How to upload and download aspx files from sitepages in sharepoint online如何从在线共享点的站点页面上传和下载 aspx 文件
【发布时间】:2020-05-19 03:01:57
【问题描述】:

我想从 SharePoint Online 中的网站页面上传和下载 aspx 文件。有可能吗?

【问题讨论】:

  • 我根据this解决了我的问题。

标签: sharepoint-online


【解决方案1】:

您可以通过 Rest API 下载它: Working with files by using REST

下面是一个关于如何下载页面文件的python:

from shareplum import Site
from shareplum import Office365
from shareplum.site import Version
from config import config

# get data from configuration
username = config['sp_user']
password = config['sp_password']
site_name = config['sp_site_name']
base_path = config['sp_base_path']
doc_library = config['sp_doc_library']

authcookie = Office365(base_path, username=username, password=password).GetCookies()
site = Site('https://xxxx.sharepoint.com/sites/abc',version=Version.v365, authcookie=authcookie)

folder = site.Folder('SitePages')
folder.download_file('mysitepage.aspx', 'mysitepage.aspx')

【讨论】:

  • 应该是 folder.get_file('mysitepage.aspx')
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-01-18
相关资源
最近更新 更多