Table of Contents

Class FileEditor

Namespace
Dynamicweb.Content.Items.Editors
Assembly
Dynamicweb.dll

Represents a file editor.

[Editor("File")]
public class FileEditor : Editor, IParameterOptions, IParameterVisibility
Inheritance
FileEditor
Implements
Inherited Members

Properties

AllowFrontendUpload

[AddInParameter("Allow file upload from frontend")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool AllowFrontendUpload { get; set; }

Property Value

bool

BaseDirectory

Gets or sets the virtual path to the base directory.

[AddInParameter("Base directory")]
[AddInParameterEditor(typeof(FolderSelectEditor), "htmlClass=std editor-parameter")]
public string? BaseDirectory { get; set; }

Property Value

string

DataType

Gets the data type for this editor.

public override Type DataType { get; }

Property Value

Type

DefaultAspectRatio

[AddInParameter("Default aspect ratio")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "noneText=Original")]
public string? DefaultAspectRatio { get; set; }

Property Value

string

Extensions

Gets or sets the allowed extensions.

[AddInParameter("Extensions")]
[AddInParameterEditor(typeof(TextParameterEditor), "")]
public string? Extensions { get; set; }

Property Value

string

Remarks

If extensions are entered, only files of those extensions are passed.

MaxFilesToAdd

[AddInParameter("Max files to add")]
[AddInParameterEditor(typeof(TextParameterEditor), "")]
public string? MaxFilesToAdd { get; set; }

Property Value

string

ShowAsImageSelector

[AddInParameter("Show as image selector")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool ShowAsImageSelector { get; set; }

Property Value

bool

UseAspectRatio

[AddInParameter("Use aspect ratio for images")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool UseAspectRatio { get; set; }

Property Value

bool

UseFocalSelector

[AddInParameter("Use focal point selector for images")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool UseFocalSelector { get; set; }

Property Value

bool

Validators

Gets or sets the list of editor validators.

public override ValidatorCollection Validators { get; }

Property Value

ValidatorCollection

Methods

GetHiddenParameterNames(string, object?)

public IEnumerable<string> GetHiddenParameterNames(string parameterName, object? parameterValue)

Parameters

parameterName string
parameterValue object

Returns

IEnumerable<string>

GetParameterOptions(string)

public IEnumerable<ParameterOption> GetParameterOptions(string parameterName)

Parameters

parameterName string

Returns

IEnumerable<ParameterOption>

GetViewModelValue(object?)

Gets the value to use when rendering items in view models - GetValue(string)

public override object? GetViewModelValue(object? value)

Parameters

value object

Returns

object

RenderValue(EditorRenderingContext)

Renders value.

public override void RenderValue(EditorRenderingContext context)

Parameters

context EditorRenderingContext

Editor rendering context.

To top