I'm able to upload an Aspx page to my SharePoint project with the help of Python. The project has an "Edit" button for every Aspx page created in SharePoint which helps in editing the content of the page.
But the uploaded page from Python does not have any action for the "Edit" button. I want to know why is this happening. I'm new to Python and SharePoint automation please help me out.
Code to upload Aspx page:
path = "local path to my .aspx"
with open(path, 'rb') as content_file:
file_content = content_file.read()
target_folder = ctx.web.get_folder_by_server_relative_url(My_SharePoint_Folder_Path)
name = os.path.basename(path)
target_file = target_folder.upload_file(name, file_content).execute_query()
print("File has been uploaded to url: {0}".format(target_file.serverRelativeUrl))
This is the button that I'm talking about: Edit Button
Am I doing something wrong or do I have to change settings. Please help!!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.