Click or drag to resize
MediaFileInfoProviderSetMediaFileInfo Method

Note: This API is now obsolete.

Sets (updates or inserts) specified media file.

Namespace: CMS.MediaLibrary
Assembly: CMS.MediaLibrary (in CMS.MediaLibrary.dll) Version: 13.0.131
Syntax
C#
[ObsoleteAttribute("Use IMediaFileInfoProvider.Set(MediaFileInfo) instead. To indicate whether unique file name is to be ensured, use the MediaFileInfo.EnsureUniqueFileName(bool) method. Set the MediaFileInfo.FileCreatedByUserID and MediaFileInfo.FileModifiedByUserID properties explicitly instead of passing the user ID. To get an instance of the interface's implementation, use dependency injection or access the instance directly - MediaFileInfo.Provider.")]
public static void SetMediaFileInfo(
	MediaFileInfo mediaFile,
	bool ensureUniqueFileName = true,
	int userId = 0
)

Parameters

mediaFile
Type: CMS.MediaLibraryMediaFileInfo
Media file to set
ensureUniqueFileName (Optional)
Type: SystemBoolean
Indicates if unique file name should be ensured
userId (Optional)
Type: SystemInt32
ID of the user performing set action
See Also