locked
Rest API Attachment in office 365 RRS feed

  • Question

  • Dear Team,

    i am using office 365 online in sharepoint 2013 , to attached the document to a list items.please let me know if you have any code for this

    Tuesday, December 8, 2015 9:40 AM

Answers

  • From; https://msdn.microsoft.com/en-us/library/office/dn292553.aspx#FileAttachments

    url: http://site url/_api/web/lists/getbytitle('list title')/items(item id)/AttachmentFiles/ add(FileName='file name')
    method: POST
    headers:
        Authorization: "Bearer " + accessToken
        body: "Contents of file."
        X-RequestDigest: form digest value
        content-length:length of post body


    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

    • Proposed as answer by Victoria Xia Monday, December 14, 2015 4:57 AM
    • Marked as answer by Victoria Xia Tuesday, December 22, 2015 10:34 AM
    Tuesday, December 8, 2015 9:54 AM