Click or drag to resize
DocumentHelperAddUnsortedAttachment Method (TreeNode, Guid, HttpPostedFile, Int32, Int32, Int32)

Note: This API is now obsolete.

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: 13.0.131
Syntax
C#
[ObsoleteAttribute("Use 'CMS.DocumentEngine.DocumentHelper.AddUnsortedAttachment(CMS.DocumentEngine.TreeNode, System.Guid, CMS.Base.IUploadedFile, System.Int32, System.Int32, System.Int32)' instead. You can use the 'CMS.Base.UploadExtensions.ToUploadedFile' extensions method for converting 'System.Web.HttpPostedFile' to the 'CMS.Base.IUploadedFile'.")]
public static DocumentAttachment AddUnsortedAttachment(
	TreeNode node,
	Guid attachmentGuid,
	HttpPostedFile file,
	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
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: DocumentAttachment
See Also