Class FileUploadPropertyEditor
Defines the file upload property editor.
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Infrastructure.dll
Syntax
[DataEditor("Umbraco.UploadField", ValueEditorIsReusable = true)]
public class FileUploadPropertyEditor : DataEditor, IDataEditor, IDiscoverable, IMediaUrlGenerator
Constructors
View SourceFileUploadPropertyEditor(IDataValueEditorFactory, IIOHelper)
Initializes a new instance of the FileUploadPropertyEditor class.
Declaration
public FileUploadPropertyEditor(IDataValueEditorFactory dataValueEditorFactory, IIOHelper ioHelper)
Parameters
| Type | Name | Description |
|---|---|---|
| IDataValueEditorFactory | dataValueEditorFactory | |
| IIOHelper | ioHelper |
Methods
View SourceCreateConfigurationEditor()
Creates a configuration editor instance.
Declaration
protected override IConfigurationEditor CreateConfigurationEditor()
Returns
| Type | Description |
|---|---|
| IConfigurationEditor |
CreateValueEditor()
Creates the corresponding property value editor.
Declaration
protected override IDataValueEditor CreateValueEditor()
Returns
| Type | Description |
|---|---|
| IDataValueEditor | The corresponding property value editor. |
TryGetMediaPath(string?, object?, out string)
Tries to get a media path for a given property editor alias
Declaration
public bool TryGetMediaPath(string? propertyEditorAlias, object? value, out string mediaPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyEditorAlias | The property editor alias |
| object | value | The value of the property |
| string | mediaPath | The media path |
Returns
| Type | Description |
|---|---|
| bool | True if a media path was returned |