# File

<ks-form-field type="file" label="Attachments" />

# Value

The value returned from the component is unique from the other input types as it returns a FileList which is an array of files that have been returned from the input. Each file will have the following properties:

{
    lastModified: 'the last modified time of the file, in millisecond since the UNIX epoch',
    lastModifiedDate: 'the last modified Date of the file referenced by the File object',
    name: 'the name of the file',
    webkitRelativePath: 'the path the URL of the File is relative to',
    size: 'the size of the file in bytes',
    type: 'the MIME type of the file'
}

# Properties

The following properties are specific to the file input type.

Property Attribute Description Type Default
accept accept a comma-separated list of one or more file types, describing which file types to allow string undefined
multiple multiple indicates if an input can have more than one value boolean false
webkitdirectory webkitdirectory indicates that the element should let the user select directories instead of files (read more) (opens new window) boolean false
capture capture specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept attribute (read more) (opens new window) 'user' or 'environment' undefined

# Usage

For more information on how to use the form field component and it's available configurations, check out the documentation.