-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add & delete attachments possibility #33
base: master
Are you sure you want to change the base?
Conversation
@pierrejochem Unfortunately (or maybe fortunately?) I haven't had to use this library in awhile, and don't have access to a SharePoint environment to test. However, any implementation seems better than raising |
But I have 😄 Great work from you guys! |
@cchurch I could contribute to the Project. If this is possible? |
@cchurch I would make the merges and testing |
@pierrejochem I ended up writing the exact same code for the add function. When I try to add an attachment using a str object as the content I receive a vague error: |
Hello @bash-j I need more Details. Could you please try first my version from here: |
I found the content returned by the request was empty because the server was returning a 400 error, so lxml had nothing to parse. I discovered SharePoint is expecting a base64 array. After a lot of trial and error I found the following code works with a string, a text file and binary files.
|
Sorry, yes of course: https://msdn.microsoft.com/en-us/library/lists.lists.addattachment(v=office.12).aspx
It was self-evidently for me so I have not ask for it. But you found it by yourself and that is important. |
@alexsdutton @cchurch @chris-bradley Please have a look.