Display file links:
foreach (String fileAtt in attachmentsAtt)
{
String attachmentAbsoluteURL =
item.Attachments.UrlPrefix // gets the containing directory URL
+ fileAtt;
// Add ToDo here
}
Get SPFile from Attachment:
SPAttachmentCollection attachmentsAtt = item.Attachments;
foreach (String fileAtt in attachmentsAtt)
{
SPFile file = web.GetFile(attachmentsAtt.UrlPrefix + fileAtt);
// Add ToDo here
}
沒有留言:
張貼留言