Skip to main content

Interface: InputFileProps

Defined in: forms/input/inputFile.tsx:26

Props for InputFile component.

See

InputFile

Extends

Properties

PropertyTypeDescriptionInherited from

allowDrop?

(item) => boolean

Handler to check whether it is allowed to drop files into the input.

factory

DataFactory

RDF/JS-compatible term factory to create RDF terms.

InputMultiProps.factory

fileAccept?

string

Accepted file types for the file selection.

Example: .jpg,.jpeg,.png,.svg,.gif

fileMetadata?

ReadonlyMap<ElementIri, ElementModel>

File metadata for files that cannot be resolved from the uploader provider.

This metadata is required to be able to display info about existing files, i.e. files from the dataset.

For example, useEntityData() can be used to resolve metadata from a DataProvider this way:

const {data: fileMetadata} = Reactodia.useEntityData(
model.dataProvider,
props.values.filter(v => v.termType === 'NamedNode').map(v => v.value)
);

getFileCategory?

(fileIri, metadata) => InputFileCategory

Handler to determine category for a file.

By default, defaultFileCategory is used.

languages

readonly string[]

Languages to author text literals.

Usually provided by MetadataProvider.getLiteralLanguages.

InputMultiProps.languages

placeholder?

string

Input placeholder text (if applicable).

InputMultiProps.placeholder

readonly?

boolean

Whether the property input should be read-only (disabled).

InputMultiProps.readonly

shape

MetadataPropertyShape

Property shape metadata.

InputMultiProps.shape

updateValues

(updater) => void

Sets the current list (or set) of values for the edited property.

InputMultiProps.updateValues

uploader

FileUploadProvider

Provides the strategy to upload files from this input.

values

readonly (Literal | NamedNode<string>)[]

Current list (or set) of values for the edited property.

InputMultiProps.values