Click or drag to resize
FileUploaderComponent Class
Represents a file uploader form component. The component is designed for use in Forms application only.
Inheritance Hierarchy
SystemObject
  Kentico.Forms.Web.MvcFormComponent
    Kentico.Forms.Web.MvcFormComponentFileUploaderProperties, BizFormUploadFile
      Kentico.Forms.Web.MvcFileUploaderComponent

Namespace: Kentico.Forms.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
public class FileUploaderComponent : FormComponent<FileUploaderProperties, BizFormUploadFile>

The FileUploaderComponent type exposes the following members.

Constructors
  NameDescription
Public methodFileUploaderComponent
Initializes a new instance of the FileUploaderComponent class.
Top
Fields
  NameDescription
Public fieldStatic memberIDENTIFIER
Represents the FileUploaderComponent identifier.
Top
Properties
  NameDescription
Public propertyBaseProperties
Gets the form component's properties as its base type.
(Inherited from FormComponentTProperties, TValue.)
Public propertyCustomAutopostHandling
If true, prevents built-in visibility condition handling for this component.
(Inherited from FormComponent.)
Public propertyDefinition
Gets or sets the definition under which the form component is registered in the system.
(Inherited from FormComponent.)
Public propertyDeleteOrReplaceFile
Gets or sets a value indicating whether to delete or replace the current form file.
Public propertyFileInputClientId
Represents the identifier of the file uploader.
Public propertyFormSite
Gets the site of the form this component is being used for. The site is determined from the bound context.
Public propertyHasDependingFields
Gets or sets a value indicating whether there are another form components whose visibility condition depends on this component's value.
(Inherited from FormComponent.)
Public propertyLabelForPropertyName
Gets the name of the FileInputClientId property.
(Overrides FormComponentLabelForPropertyName.)
Public propertyMaxAllowedFileSize
Gets the maximal size of the file that can be uploaded in kilobytes.
Public propertyName
Gets or sets the name of the corresponding form field. The name is used as a prefix when naming the HTML input.
(Inherited from FormComponent.)
Public propertyOriginalFileName
Gets or sets the original file name of the form file.
Public propertyPlainOriginalFileName
Gets or sets the original file name of the form file.
Public propertyPlainSystemFileName
Represents the identifier of the permanent file that is already stored in the database and file system.
Public propertyPlainTempFileIdentifier
Represents the identifier of the newly uploaded file in the unprotected format.
Public propertyProperties
Gets the form component's properties.
(Inherited from FormComponentTProperties, TValue.)
Public propertyPropertiesType
Gets the properties type of the form component.
(Inherited from FormComponent.)
Public propertyShowPartialValidationMessages
Also shows validation errors of partial values of the component. If false, each individual component should contain validation message in its partial view.
(Inherited from FormComponent.)
Public propertyShowViewFileLink
Gets a value indicating whether to display a view file link after a file has previously been uploaded.
Public propertySystemFileName
Gets or sets the permanent file name of the form file.
Public propertyTempFileIdentifier
Gets or sets the identifier of the newly uploaded file.
Public propertyTempFileOriginalName
Gets or sets the original name of the newly uploaded file.
Top
Methods
  NameDescription
Public methodBindContext
Binds contextual information to the form component.
(Overrides FormComponentBindContext(FormComponentContext).)
Public methodGetDisplayName
Returns non-localized string representing component name. Component Name is returned in case of empty Label.
(Inherited from FormComponent.)
Public methodGetFileUploadParameters
Returns parameters to PostFile(Int32, String, String) endpoint for file upload from this form component.
Public methodGetModelPropertyCustomAttributesT
Gets a collection of custom attributes applied to the model's property this form component represents.
(Inherited from FormComponent.)
Public methodGetObjectValue
Gets the value of the form component. The GetValue method can be used directly to obtain the typed value.
(Inherited from FormComponentTProperties, TValue.)
Public methodGetValue
Gets the identification string of the form file. Gets the TempFileIdentifier.
(Overrides FormComponentTProperties, TValueGetValue.)
Public methodLoadProperties
Loads properties of the form component. The actual properties type must match the PropertiesType.
(Inherited from FormComponentTProperties, TValue.)
Public methodModifyMetadata
Modifies modelMetadata according to the current object.
(Inherited from FormComponent.)
Public methodSetObjectValue
Sets the value of the form component. The value must be of proper type or an exception is thrown. The SetValue(TValue) method can be used directly to set the typed default value.
(Inherited from FormComponentTProperties, TValue.)
Public methodSetValue
Sets the identification string of the form file.
(Overrides FormComponentTProperties, TValueSetValue(TValue).)
Public methodValidate
Validates whether the submitted temp file still exists.
(Overrides FormComponentValidate(ValidationContext).)
Top
Extension Methods
  NameDescription
Public Extension MethodGetBizFormComponentContext
Gets BizFormComponentContext of a form component, if such a context was bound to the component.
(Defined by FormComponentExtensions.)
Top
See Also