有没有办法提取SharePoint列表中的所有附加文件?
答案 0 :(得分:1)
您可以遍历每个列表项,并获取每个附件。
List<SPAttachment> attachments = new List<SPAttachment>();
SPList list = SPContext.Current.Web.Lists["My List"];
foreach (SPListItem item in list.Items)
{
attachments.AddRange(item.Attachments.Cast<SPAttachment>());
}