Add & delete attachments possibility#33
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.