Click or drag to resize
DocumentHelperAddUnsortedAttachment Method (TreeNode, Guid, HttpPostedFile, TreeProvider, Int32, Int32, Int32)
Adds given unsorted attachment to the document or updates the attachment if already present.

Namespace: CMS.DocumentEngine
Assembly: CMS.DocumentEngine (in CMS.DocumentEngine.dll) Version: 9.0.0
Syntax
C#
public static AttachmentInfo AddUnsortedAttachment(
	TreeNode node,
	Guid attachmentGuid,
	HttpPostedFile file,
	TreeProvider tree,
	int width = -1,
	int height = -1,
	int maxSideSize = -1
)

Parameters

node
Type: CMS.DocumentEngineTreeNode
Document node
attachmentGuid
Type: SystemGuid
Attachment GUID
file
Type: System.WebHttpPostedFile
Attachment file path
tree
Type: CMS.DocumentEngineTreeProvider
TreeProvider to use
width (Optional)
Type: SystemInt32
New width of the image attachment
height (Optional)
Type: SystemInt32
New height of the image attachment
maxSideSize (Optional)
Type: SystemInt32
Maximum side size of the image attachment

Return Value

Type: AttachmentInfo
See Also