Hi:
I was using the API for trying to invoke the method DocumentHelper.GetAttachments to get the attachment info with the binary data:
DocumentHelper.GetAttachments( node, where, orderBy, true, tree);
but when i checked the column "AttachmentBinary" , it appeared empty ,also i was validating in CMS that the document has the attachment and it´s ok ; so i would like to know if exists another API method to get the binary data of a document's attachment or it must to configure some permissions on CMS to get the binary data when i invoke the mentionated method.
Thanks
Age you trying go get attachment sitting in page field, od those sitting in Page -> Properties -> Attachments?
I'm just trying to get the binary data attachment of a "CMS.File" document-type using the API.
Try to grab FileAttacment value from CMS.File and use following code to get the attachment object, where you should be able to find binaries:
DocumentHelper.GetAttachment(guid, tree, siteName);
Hi, if you are using setting Store files in file system and not in database, then attachment infos do not directly contain binary data. In this case you need to use method AttachmentInfoProvider.GetFile(attachmentInfo, siteName) to get the binary data.
Please, sign in to be able to submit a new answer.