Click or drag to resize
AttachmentInfoProviderAddTemporaryAttachment Method (Guid, String, Guid, Guid, AttachmentSource, 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: 11.0.0
Syntax
C#
public static AttachmentInfo AddTemporaryAttachment(
	Guid formGuid,
	string guidColumnName,
	Guid attachmentGuid,
	Guid groupGuid,
	AttachmentSource file,
	int siteId,
	int width,
	int height,
	int maxSideSize
)

Parameters

formGuid
Type: SystemGuid
GUID of the form
guidColumnName
Type: SystemString
Column containing the Attachment GUID (optional)
attachmentGuid
Type: SystemGuid
GUID of the attachment (optional)
groupGuid
Type: SystemGuid
GUID of the attachment group (optional)
file
Type: CMS.DocumentEngineAttachmentSource
Attachment file (HttpPostedFile or file path)
siteId
Type: SystemInt32
Site ID
width
Type: SystemInt32
New width of the image attachment (Use ImageHelper.AUTOSIZE to keep the width)
height
Type: SystemInt32
New height of the image attachment (Use ImageHelper.AUTOSIZE to keep the height)
maxSideSize
Type: SystemInt32
Maximal side size of the image attachment

Return Value

Type: AttachmentInfo
See Also