Click or drag to resize
LinkMediaSelectorInitializeMediaItem Method (String, String, Int32, Int32, Int64, String, String, Int32, Int32, String)
Initializes new media item object using specified details.

Namespace: CMS.UIControls
Assembly: CMS.UIControls (in CMS.UIControls.dll) Version: 10.0.0
Syntax
C#
protected static MediaItem InitializeMediaItem(
	string name,
	string ext,
	int imageWidth,
	int imageHeight,
	long size,
	string url,
	string permanentUrl,
	int historyId,
	int nodeId,
	string aliasPath
)

Parameters

name
Type: SystemString
Name of the file
ext
Type: SystemString
Extension of the file
imageWidth
Type: SystemInt32
Width of an image if applicable
imageHeight
Type: SystemInt32
Height of an image if applicable
size
Type: SystemInt64
Size of the item
url
Type: SystemString
Url of the file
permanentUrl
Type: SystemString
Permanent url of the file
historyId
Type: SystemInt32
ID of the attachment history
nodeId
Type: SystemInt32
ID of node
aliasPath
Type: SystemString
Alias path

Return Value

Type: MediaItem
See Also