Question

I am trying to get all attachments in a custom list that has been attacht to the all items. I have used /_vti_bin/listdata.svc/MyList/attachmentFiles but it returns the request URI is not valid. How do I get all attachments in a custom list? I cannot use CSOM or JSOM, because the list is located in different site collection. appreciate all kind of advice. (it is a SharePoint 2010 environment).

Was it helpful?

Solution

First of all, SP.ListItem.attachmentFiles property is not available in SharePoint 2010.

The following REST query returns all attachments in a List in SharePoint 2010:

http://<sitecollection>/<site>/_vti_bin/ListData.svc/Requests?$select=Attachments&$expand=Attachments 
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top