info@syncworx.com
-
9/24/2010 3:23:17 AM
Trying to Use API as Demo
Hello Guys,
We are evaluating the API Library of Kentico and we are trying to upload Attachments using custom code. We marked on the Site Manager to Save all Files on Physical Disk instead of Database. The Code we are using to upload the attachment is as following:
// Create the attachment manager AttachmentManager am = new AttachmentManager(tp.Connection); // Create the attachment Guid attachmentGuid = Guid.NewGuid(); AttachmentInfo ai = new AttachmentInfo("D:\\C-ICLW1733.jpg", node.DocumentID, attachmentGuid, tp.Connection); am.SetAttachmentInfo(ai); // Set the attachment reference node.SetValue("BookFImage", attachmentGuid); node.Update();
The code is working but it is not saving the attachment physically on the Upload Folder.
Please advice.
Regards,
|