We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, Great python client. I'm now using it regularly to load files from my linux box to a Sharepoint website.
I'm just unable to write into specific subfolders of the Shared Documents folder?
The example in file_operations.py seems to write only in the root folder:
In upload_file() there is: file = upload_file_into_library(library, os.path.basename(path), file_content)
file = upload_file_into_library(library, os.path.basename(path), file_content)
Note the 'basename' part
And then in upload_file_into_library we have:
target_file = target_library.root_folder.files.add(info)
Note the 'root_folder' part.
Any example on how to write into something like ShareDocuments/my_specific_folder ?
Thank you
The text was updated successfully, but these errors were encountered:
Hi, try this instead:
#target_file = targetLibrary.root_folder.files.add(info) folder = ctx.web.get_folder_by_server_relative_url(app_settings['urlrel']) target_file = folder.files.add(info)
where urlel is a path to your subfolder, e.g. '/sites/FRAReporting/Shared Documents/TEST'
Hope it helps.
m.
Sorry, something went wrong.
I mean, app_settings = { 'urlrel': '/sites/FRAReporting/Shared Documents/TEST' }
Fantastic. It worked!
Thank you, Boris
Thank you,!!!
No branches or pull requests
Hello,
Great python client. I'm now using it regularly to load files from my linux box to a Sharepoint website.
I'm just unable to write into specific subfolders of the Shared Documents folder?
The example in file_operations.py seems to write only in the root folder:
In upload_file() there is:
file = upload_file_into_library(library, os.path.basename(path), file_content)
Note the 'basename' part
And then in upload_file_into_library we have:
target_file = target_library.root_folder.files.add(info)
Note the 'root_folder' part.
Any example on how to write into something like ShareDocuments/my_specific_folder ?
Thank you
The text was updated successfully, but these errors were encountered: