LinkMediaSelectorInitializeMediaItem Method (String, String, Int32, Int32, Int64, String, String, Int32, Int32, String, String) |
Initializes new media item object using specified details.
Namespace: CMS.UIControlsAssembly: CMS.UIControls (in CMS.UIControls.dll) Version: 13.0.131
Syntax protected static MediaItem InitializeMediaItem(
string name,
string ext,
int imageWidth,
int imageHeight,
long size,
string url,
string permanentUrl,
int historyId,
int nodeId,
string aliasPath,
string description = ""
)
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 - description (Optional)
- Type: SystemString
File description
Return Value
Type:
MediaItemSee Also