New issue
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
How can i upload a file to sharepoint ? #40
Comments
I've only used the
|
@benpolinsky Thanks for posting the snippets i eventually got it working. I had trouble getting the form digest at first, but once i figured out how to do that it worked.
|
I'd prefer to have a simple api to upload a file to sharepoint. This is way too complex. |
@attibalazs Thanks for the script. I did run into the following error and currently stuck here: File "C:\Python27\lib\site-packages\office365\runtime\auth\saml_token_provider.py", line 65, in get_authentication_cookie Did you also need to use a client id and client secret in addition to the SP Online url, username and password? |
Thanks for this @attibalazs . It worked great for me. |
I have doubt.. Does this code work for organisation accounts like myname@domain.mycompany.com or we need to have a proper office365 account like myname@mycompany.onmicrosoft.com ? |
Hi, I used @attibalazs script, which seems to work well until I try to upload data in Sharepoint : I got 403 status. Is there something I should change in my office account config to get rights to write in Sharepoint in this way ? |
@attibalazs |
Hello, I added some adjustments to your code that are working for me:
|
Greetings, I propose to close this one since it has been answered. To summarize:the recommended way to upload a file into SharePoint library is demonstrated below:
But if file is larger than 2 MB then file needs to be uploaded as set of chunks:
where
If you prefer to construct a upload request by yourself then the snippets provided by @attibalazs and @benpolinsky is a way to go. Vadim |
I am trying to upload a file to sharepoint, am I on the right path ?
The text was updated successfully, but these errors were encountered: