Home Reference Source
import FileComponent from 'formiojs/src/components/file/File.js'
public class | source

FileComponent

Extends:

src/components/_classes/component/Component.js~ComponentField → FileComponent

Static Member Summary

Static Public Members
public static get

builderInfo: {"title": string, "group": string, "icon": string, "documentation": string, "weight": number, "schema": *}

Static Method Summary

Static Public Methods
public static

schema(extend: ...*): *

Member Summary

Public Members
public get
public set
public get
public
public get
public

dataValue: *[]

public get
public get
public get

emptyValue: *[]

public
public
public
public get
public get
public

statuses: *[]

public

support: {"filereader": *, "formdata": *, "hasWarning": *, "progress": *}

public get
public
Private Members
private

Method Summary

Public Methods
public

attach(element: *): *

public

browseFiles(attrs: {}): *

public

deleteFile(fileInfo: *)

public
public

fileSize(a: *, b: *, c: *, d: *, e: *): string

public

focus()

public

getFile(fileInfo: *): *

public

getFrame(videoPlayer: *): *

public

getValue(): *

public

getValueAsString(value: *): *

public

getVideoStream(constraints: *): *

public

globStringToRegex(str: *): {"regexp": *, "excludes": *}

public

init()

public

loadImage(fileInfo: *): *

public

render(): *

public
public
public

stopVideoStream(videoStream: *)

public
public

translateScalars(str: *): *

public

upload(files: *)

public

validateMaxSize(file: *, val: *): *

public

validateMinSize(file: *, val: *): *

public

validatePattern(file: *, val: *): *

Inherited Summary

From class Field
public

render(element: *): *

Static Public Members

public static get builderInfo: {"title": string, "group": string, "icon": string, "documentation": string, "weight": number, "schema": *} source

Static Public Methods

public static schema(extend: ...*): * source

Params:

NameTypeAttributeDescription
extend ...*

Return:

*

Public Members

public get browseOptions: * source

public set cameraMode source

public get cameraMode: * source

public className: string source

public get dataReady: * source

public dataValue: *[] source

public get defaultSchema: * source

public get defaultValue: * source

public get emptyValue: *[] source

public filesReady: * source

public filesReadyReject: * source

public filesReadyResolve: * source

public get hasTypes: * source

public get imageUpload: * source

public statuses: *[] source

public support: {"filereader": *, "formdata": *, "hasWarning": *, "progress": *} source

public get useWebViewCamera: * source

public videoStream: * source

Private Members

private _cameraMode: * source

Public Methods

public attach(element: *): * source

Params:

NameTypeAttributeDescription
element *

Return:

*

public browseFiles(attrs: {}): * source

Params:

NameTypeAttributeDescription
attrs {}
  • optional
  • default: {}

Return:

*

public deleteFile(fileInfo: *) source

Params:

NameTypeAttributeDescription
fileInfo *

public destroy() source

public fileSize(a: *, b: *, c: *, d: *, e: *): string source

Params:

NameTypeAttributeDescription
a *
b *
c *
d *
e *

Return:

string

public focus() source

public getFile(fileInfo: *): * source

Params:

NameTypeAttributeDescription
fileInfo *

Return:

*

public getFrame(videoPlayer: *): * source

Params:

NameTypeAttributeDescription
videoPlayer *

Return:

*

public getValue(): * source

Return:

*

public getValueAsString(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

public getVideoStream(constraints: *): * source

Params:

NameTypeAttributeDescription
constraints *

Return:

*

public globStringToRegex(str: *): {"regexp": *, "excludes": *} source

Params:

NameTypeAttributeDescription
str *

Return:

{"regexp": *, "excludes": *}

public init() source

public loadImage(fileInfo: *): * source

Params:

NameTypeAttributeDescription
fileInfo *

Return:

*

public render(): * source

Override:

Field#render

Return:

*

public startVideo() source

public stopVideo() source

public stopVideoStream(videoStream: *) source

Params:

NameTypeAttributeDescription
videoStream *

public takePicture() source

public translateScalars(str: *): * source

Params:

NameTypeAttributeDescription
str *

Return:

*

public upload(files: *) source

Params:

NameTypeAttributeDescription
files *

public validateMaxSize(file: *, val: *): * source

Params:

NameTypeAttributeDescription
file *
val *

Return:

*

public validateMinSize(file: *, val: *): * source

Params:

NameTypeAttributeDescription
file *
val *

Return:

*

public validatePattern(file: *, val: *): * source

Params:

NameTypeAttributeDescription
file *
val *

Return:

*