This project has moved and is read-only. For the latest updates, please go here.



Web Service





  • This operation accepts a webURL option. This allows you to change the context for the operation to a different site. Using a GUID for the listName does NOT change the context as it does with the Object Model, so you need to use the webURL option as well if your list is in a different site.


This is an example from Matt Bramer (iOnline247) from his post in the discussions.

  operation: "GetAttachmentCollection",
  listName: "MahAwesomeListName",
  ID: id,
  completefunc: function(xData, Status) {
    //console.log( Status );
    //console.log( xData.responseText );

    var output = "";


    $(xData.responseXML).find("Attachments > Attachment").each(function(i, el) {
      var $node = $(this),
        filePath = $node.text(),
        arrString = filePath.split("/"),
        fileName = arrString[arrString.length - 1];

      output += "<a href='" + filePath + "' target='_blank'>" + fileName + "</a><br />";


Last edited Mar 31, 2014 at 2:14 PM by sympmarc, version 1


Rothrock42 Oct 22, 2015 at 12:59 AM 
I couldn't get this to work. Nor could I get the solutions presented about using the CAMLQueryOptions include all attachments to work.

What did work was just adding "Attachments" to the list of fields I wished to retrieve.

Senior_MelviN Jun 26, 2015 at 12:32 PM 
This code (Example) not working. Working this: