Click or drag to resize
AttachmentInfoProviderAddTemporaryAttachment Method (Guid, Guid, Guid, HttpPostedFile, Int32, Int32, Int32, Int32)
Adds the temporary attachment to the document, updates the attachment if currently present.

Namespace: CMS.DocumentEngine
Assembly: CMS.DocumentEngine (in CMS.DocumentEngine.dll) Version: 9.0.0
Syntax
C#
public static AttachmentInfo AddTemporaryAttachment(
	Guid formGuid,
	Guid attachmentGuid,
	Guid groupGuid,
	HttpPostedFile file,
	int siteId,
	int width = -1,
	int height = -1,
	int maxSideSize = -1
)

Parameters

formGuid
Type: SystemGuid
GUID of the form
attachmentGuid
Type: SystemGuid
GUID of the attachment (optional)
groupGuid
Type: SystemGuid
GUID of the attachment group (optional)
file
Type: System.WebHttpPostedFile
Attachment file
siteId
Type: SystemInt32
Site ID
width (Optional)
Type: SystemInt32
New width of the image attachment (Use ImageHelper.AUTOSIZE to keep the width)
height (Optional)
Type: SystemInt32
New height of the image attachment (Use ImageHelper.AUTOSIZE to keep the height)
maxSideSize (Optional)
Type: SystemInt32
Maximal side size of the image attachment

Return Value

Type: AttachmentInfo
See Also