Ok, so I'm trying to write some functionality into a webpart using C#.
Basically I have a document that may or may not have an attachment.
I also have another document that definately has an attachment.
I want to take the attachment associated with the 2nd document, and assign it to the first document instead.
So if my first document has an attachment, I use this to get rid of said attachment.
DocumentHelper.DeleteAttachment(node, oldGuid, tree);
Now, How do I attach the other Documents attachment to it.
All the references for AddAttatchment want an httpPostedfile, which I don't have, it's already in the database. I got the GUID for the attachment I want to attach...how do I use it.?
I thought to try
DocumentHelper.UpdateAttachment(node, oldGuid, newGuid);
But this doesn't work if there wasn't an old Guid that's being replaced.