Class ContentSectionExtensions
Inheritance
System.Object
Namespace: Umbraco.Core.Configuration.UmbracoSettings
Assembly: Umbraco.Core.dll
Syntax
public static class ContentSectionExtensions
Methods
View SourceGetConfig(IContentSection, String)
Gets the auto-fill configuration for a specified property alias.
Declaration
public static IImagingAutoFillUploadField GetConfig(this IContentSection contentSection, string propertyTypeAlias)
Parameters
Type | Name | Description |
---|---|---|
IContentSection | contentSection | |
System.String | propertyTypeAlias | The property type alias. |
Returns
Type | Description |
---|---|
IImagingAutoFillUploadField | The auto-fill configuration for the specified property alias, or null. |
IsFileAllowedForUpload(IContentSection, String)
Determines if file extension is allowed for upload based on (optional) white list and black list held in settings. Allow upload if extension is whitelisted OR if there is no whitelist and extension is NOT blacklisted.
Declaration
public static bool IsFileAllowedForUpload(this IContentSection contentSection, string extension)
Parameters
Type | Name | Description |
---|---|---|
IContentSection | contentSection | |
System.String | extension |
Returns
Type | Description |
---|---|
System.Boolean |
IsImageFile(IContentSection, String)
Gets a value indicating whether the file extension corresponds to an image.
Declaration
public static bool IsImageFile(this IContentSection contentConfig, string extension)
Parameters
Type | Name | Description |
---|---|---|
IContentSection | contentConfig | |
System.String | extension | The file extension. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the file extension corresponds to an image. |