when i use API and this code:
var newAttachment = new AttachmentInfo
{
AttachmentDocumentID = node.DocumentID,
AttachmentExtension = item.FileType,
AttachmentSize = (int)item.FileSize,
AttachmentName = item.FileName,
AttachmentMimeType = MimeTypeHelper.GetMimetype(item.FileType),
AttachmentTitle = item.FileName,
AttachmentDescription = "",
AttachmentSiteID = CMS.SiteProvider.SiteContext.CurrentSiteID,
AttachmentGUID = guid
};
DocumentHelper.AddAttachment(node, "DocFile", guid, groupGuid, newAttachment, provider);
node.Update();
For each record in the CMS_Attachment table inserted, two different AttachmentGuid inserted.
While I have used a single guid for both attachments.
This makes it, both attachments can't take a physical file, because file system use from attachment guid for attachment file name.