-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
With office365.runtime, I did it as shown below. How would you suggest doing it with SharePlum?
# Get authorization from the site url.
ctx = ClientContext(siteurl, ctx_auth)
with open(localpath, 'rb') as content_file:
file_content = content_file.read()
dir, name = os.path.split(remotepath)
file = ctx.web.get_folder_by_server_relative_url(dir).upload_file(name, file_content).execute_query()
sourcedoc = '{' + file.properties['UniqueId'] + '}'
fullurl = siteurl + '_layouts/15/Doc.aspx?sourcedoc=' + urllib.parse.quote(sourcedoc)
Metadata
Metadata
Assignees
Labels
No labels